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:
fe90a14
)
lib: Fix memory leak when debugging enabled (found by valgrind).
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 24 Nov 2011 15:50:54 +0000
(15:50 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Thu, 24 Nov 2011 21:07:29 +0000
(21:07 +0000)
If you enabled debugging (eg. LIBGUESTFS_DEBUG=1) then every
debug message printed would be leaked.
(cherry picked from commit
dd76ce2b4c93dd10d8eca9ab7c77bc831f103d03
)
src/guestfs.c
patch
|
blob
|
history
diff --git
a/src/guestfs.c
b/src/guestfs.c
index
f4b79e7
..
450ffd8
100644
(file)
--- a/
src/guestfs.c
+++ b/
src/guestfs.c
@@
-373,6
+373,8
@@
guestfs___debug (guestfs_h *g, const char *fs, ...)
if (len < 0) return;
guestfs___call_callbacks_message (g, GUESTFS_EVENT_LIBRARY, msg, len);
+
+ free (msg);
}
/* Call trace messages. These are enabled by setting g->trace, and