git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdc726d
)
Fix four memory leaks in guestfs.c revealed by valgrind.
author
Richard Jones
<rjones@redhat.com>
Sat, 9 May 2009 12:31:08 +0000
(13:31 +0100)
committer
Richard Jones
<rjones@redhat.com>
Sat, 9 May 2009 12:31:08 +0000
(13:31 +0100)
src/guestfs.c
patch
|
blob
|
history
diff --git
a/src/guestfs.c
b/src/guestfs.c
index
be7b0c7
..
9fd943f
100644
(file)
--- a/
src/guestfs.c
+++ b/
src/guestfs.c
@@
-308,6
+308,8
@@
guestfs_close (guestfs_h *g)
}
/* release mutex (XXX) */
+ free (g->msg_in);
+ free (g->msg_out);
free (g->last_error);
free (g);
}
@@
-824,6
+826,11
@@
guestfs_launch (guestfs_h *g)
/* Parent (library). */
g->pid = r;
+ free (kernel);
+ kernel = NULL;
+ free (initrd);
+ initrd = NULL;
+
/* Fork the recovery process off which will kill qemu if the parent
* process fails to do so (eg. if the parent segfaults).
*/