[Pkg-libvirt-commits] [libguestfs] 123/266: daemon: zfile: call pclose instead of fclose

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:41:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.35-1
in repository libguestfs.

commit 06aa1bff0f865fda7d64411977bca992d97fa748
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Mon Aug 18 11:18:23 2014 +0200

    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 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;
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list