From 06aa1bff0f865fda7d64411977bca992d97fa748 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 18 Aug 2014 11:18:23 +0200 Subject: [PATCH] daemon: zfile: call pclose instead of fclose 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 856ab5fca..f1be51a83 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; }