summaryrefslogtreecommitdiff
path: root/inotail.c
diff options
context:
space:
mode:
Diffstat (limited to 'inotail.c')
-rw-r--r--inotail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/inotail.c b/inotail.c
index fe36a45..35fdd82 100644
--- a/inotail.c
+++ b/inotail.c
@@ -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;
unlock in an error path. Found by Coverity, CID 1373871. Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Josef Bacik <jbacik@fb.com> Cc: Jens Axboe <axboe@fb.com> Cc: Markus Pargmann <mpa@pengutronix.de> Fixes: 0eadf37afc250 ("nbd: allow block mq to deal with timeouts") Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c-06 10:05:07 +0000'>2011-12-06
ASoC: Provide a more complete DMA driver stubMark Brown1-1/+30
2011-10-31sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where neededPaul Gortmaker1-0/+1
2011-04-28ASoC: Work around allmodconfig failureMark Brown1-4/+2
2011-04-27ASoC: Add more natural support for no-DMA DAIsMark Brown1-0/+55
2011-02-01ASoC: Use snd_pcm_format_width() in snd_soc_params_to_frame_size()Mark Brown1-20/+3