From 3c5b447efd42b03c24104bdc1f3260e879bb1d25 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 20 Jun 2009 14:55:49 +0100 Subject: [PATCH] Check return value from pclose. --- daemon/find.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 1.8.3.1