summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-20 14:55:49 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-20 14:55:49 +0100
commit3c5b447efd42b03c24104bdc1f3260e879bb1d25 (patch)
treef7505229b09248bd986da3e484dc65dab2e73ef9 /daemon
parent65acb799d2c94e6628f647f2319eb8d16f29a0d5 (diff)
downloadlibguestfs-3c5b447efd42b03c24104bdc1f3260e879bb1d25.tar.gz
libguestfs-3c5b447efd42b03c24104bdc1f3260e879bb1d25.tar.xz
libguestfs-3c5b447efd42b03c24104bdc1f3260e879bb1d25.zip
Check return value from pclose.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/find.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/find.c b/daemon/find.c
index a873bca0..287aae39 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);