From 81e87451a835c3d759075c7876a865ea77bcc1b0 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 22 Jan 2007 20:54:21 +0100 Subject: inotail.c: Gaaah! buf is on the stack now. --- inotail.c | 3 +-- 1 file changed, 1 insertion(+), 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; -- cgit v1.2.3-54-g00ecf