X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Ffind.c;h=287aae39f275fca802ba3948d2ac117d8afee7ba;hb=c6d6f5ae1b76ec9aa5c540906aeed73d25d13eb9;hp=6a7e3e8a74d11b777d522b4150a09bf2e2fa138a;hpb=d1df2f342489bbbba086cae2bb95971c8e404cad;p=libguestfs.git diff --git a/daemon/find.c b/daemon/find.c index 6a7e3e8..287aae3 100644 --- a/daemon/find.c +++ b/daemon/find.c @@ -48,7 +48,7 @@ input_to_nul (FILE *fp, char *buf, int maxlen) } char ** -do_find (const char *dir) +do_find (char *dir) { struct stat statbuf; int r, len, sysrootdirlen; @@ -113,7 +113,11 @@ do_find (const 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);