From: Richard W.M. Jones Date: Sat, 20 Jun 2009 13:55:49 +0000 (+0100) Subject: Check return value from pclose. X-Git-Tag: 1.0.50~8 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=3c5b447efd42b03c24104bdc1f3260e879bb1d25;p=libguestfs.git Check return value from pclose. --- diff --git a/daemon/find.c b/daemon/find.c index a873bca..287aae3 100644 --- a/daemon/find.c +++ b/daemon/find.c @@ -113,7 +113,11 @@ do_find (char *dir) return NULL; } } - pclose (fp); + if (pclose (fp) == -1) { + reply_with_perror ("pclose: find"); + free_stringslen (res, size); + return NULL; + } if (r == -1) { free_stringslen (res, size);