summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2007-01-22 20:54:21 +0100
committerTobias Klauser <tklauser@xenon.tklauser.home>2007-01-22 20:54:21 +0100
commit81e87451a835c3d759075c7876a865ea77bcc1b0 (patch)
tree64a7789c3f2ca9b66956999d9e845edf240fdb2d
parenta0e2a994b8bd3b35e2916b124e7c672ce4dd608c (diff)
inotail.c: Gaaah! buf is on the stack now.
-rw-r--r--inotail.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/inotail.c b/inotail.c
index 6fed0cf..83b6beb 100644
--- a/inotail.c
+++ b/inotail.c
@@ -368,7 +368,7 @@ static int watch_files(struct file_struct *files, int n_files)
ssize_t len;
int ev_idx = 0;
- len = read(ifd, buf, (n_files * INOTIFY_BUFLEN));
+ len = read(ifd, &buf, (n_files * INOTIFY_BUFLEN));
if (len < 0) {
fprintf(stderr, "Error: Could not read inotify events (%s)\n", strerror(errno));
exit(EXIT_FAILURE);
@@ -396,7 +396,6 @@ static int watch_files(struct file_struct *files, int n_files)
}
}
- free(buf);
close(ifd);
return -1;