All instances of 'pclose' now check for return value != 0.
[libguestfs.git] / daemon / find.c
index 287aae3..7ceeafa 100644 (file)
@@ -113,7 +113,7 @@ do_find (char *dir)
       return NULL;
     }
   }
-  if (pclose (fp) == -1) {
+  if (pclose (fp) != 0) {
     reply_with_perror ("pclose: find");
     free_stringslen (res, size);
     return NULL;