leak: Appliance name was leaked during guestfs_launch.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 21 Sep 2010 18:37:24 +0000 (19:37 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 21 Sep 2010 18:51:22 +0000 (19:51 +0100)
This frees the string containing the name of the appliance
which was previously being leaked during launch.

(Found by valgrind).

src/launch.c

index 8bc96fd..e0ad165 100644 (file)
@@ -511,6 +511,8 @@ guestfs__launch (guestfs_h *g)
   kernel = NULL;
   free (initrd);
   initrd = NULL;
+  free (appliance);
+  appliance = NULL;
 
   /* Fork the recovery process off which will kill qemu if the parent
    * process fails to do so (eg. if the parent segfaults).