[Pkg-libvirt-commits] [libguestfs] 12/66: handle: Free g->backend_settings.
Hilko Bengen
bengen at moszumanska.debian.org
Fri May 9 12:56:20 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch master
in repository libguestfs.
commit 504d98f6a4fa57c6169af21c7a162f931ab90491
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Mar 31 13:33:10 2014 +0100
handle: Free g->backend_settings.
This was not being freed, resulting in a memory leak if you used
LIBGUESTFS_BACKEND_SETTINGS.
Found by valgrind.
(cherry picked from commit 1893eaded0cf7be68bc30eb3a9fbde814cb42316)
---
src/handle.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/handle.c b/src/handle.c
index 687f059..393ac1e 100644
--- a/src/handle.c
+++ b/src/handle.c
@@ -161,6 +161,7 @@ guestfs_create_flags (unsigned flags, ...)
return g;
error:
+ guestfs___free_string_list (g->backend_settings);
free (g->backend);
free (g->program);
free (g->path);
@@ -371,6 +372,7 @@ guestfs_close (guestfs_h *g)
free (g->hv);
free (g->backend);
free (g->backend_data);
+ guestfs___free_string_list (g->backend_settings);
free (g->append);
free (g);
}
--
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