diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2011-02-07 12:02:53 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2011-02-07 12:02:53 +0100 |
commit | a449425fc86e6ef5ef2a1efb37b0cc645f1b0680 (patch) | |
tree | 7e9d828f2dd9250bc94ed441fa679c5fdba38900 | |
parent | 9943e243f169f30c4397626df5d124f8a7c12546 (diff) |
This fixes a sparse warning.
-rw-r--r-- | inotail.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -707,7 +707,7 @@ ignore: static int watch_files(struct file_struct *files, int n_files) { int ifd, i; - char buf[n_files * INOTIFY_BUFLEN]; + char *buf = emalloc(n_files * INOTIFY_BUFLEN); ifd = inotify_init(); if (errno == ENOSYS) { @@ -775,6 +775,7 @@ static int watch_files(struct file_struct *files, int n_files) } } + free(buf); close(ifd); return -1; |