[Libguestfs] [PATCH 05/14] daemon: Don't leak 'cmdline' (found by valgrind).

Richard W.M. Jones rjones at redhat.com
Tue Jan 24 17:02:19 UTC 2012


From: "Richard W.M. Jones" <rjones at redhat.com>

---
 daemon/guestfsd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index ad260a3..a28e090 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -203,6 +203,8 @@ main (int argc, char *argv[])
       printf ("could not read linux command line\n");
   }
 
+  free (cmdline);
+
 #ifndef WIN32
   /* Make sure SIGPIPE doesn't kill us. */
   struct sigaction sa;
-- 
1.7.6




More information about the Libguestfs mailing list