fp was opened with popen, so close it properly.
---
daemon/file.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/daemon/file.c b/daemon/file.c
index 856ab5f..f1be51a 100644
--- a/daemon/file.c
+++ b/daemon/file.c
@@ -552,12 +552,12 @@ do_zfile (const char *method, const char *path)
if (fgets (line, sizeof line, fp) == NULL) {
reply_with_perror ("fgets");
- fclose (fp);
+ pclose (fp);
return NULL;
}
- if (fclose (fp) == -1) {
- reply_with_perror ("fclose");
+ if (pclose (fp) == -1) {
+ reply_with_perror ("pclose");
return NULL;
}
--
1.9.3