summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
Diffstat (limited to 'inotail.c')
-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;