[Pkg-libvirt-maintainers] Bug#709335: Bug#709335: libvirtd memory leakage

Salvatore Bonaccorso carnil at debian.org
Thu Apr 9 21:21:01 UTC 2015


Hi,

On Thu, Apr 09, 2015 at 11:13:47PM +0200, Salvatore Bonaccorso wrote:
> If so I would reassing the bug to netcf, adding fixing version and as
> well contact the stable release manager to propose the attache debdiff
> for the the upcoming wheezy point update.

*sigh*, if I say I'm attaching the debdiff, I should actually.

Regards,
Salvatore
-------------- next part --------------
diff -Nru netcf-0.1.9/debian/changelog netcf-0.1.9/debian/changelog
--- netcf-0.1.9/debian/changelog	2015-01-15 15:08:08.000000000 +0100
+++ netcf-0.1.9/debian/changelog	2015-04-09 23:03:56.000000000 +0200
@@ -1,3 +1,11 @@
+netcf (0.1.9-2+deb7u2) wheezy; urgency=medium
+
+  * Non-maintainer upload.
+  * Add netcf-debian-memleak.patch.
+    Prevent a memory leak when listing interfaces (Closes: #709335)
+
+ -- Salvatore Bonaccorso <carnil at debian.org>  Thu, 09 Apr 2015 23:03:13 +0200
+
 netcf (0.1.9-2+deb7u1) stable; urgency=medium
 
   * Cherrypick d340f2df to fix ipcalc_netmask.  (Closes: #726127)
diff -Nru netcf-0.1.9/debian/patches/netcf-debian-memleak.patch netcf-0.1.9/debian/patches/netcf-debian-memleak.patch
--- netcf-0.1.9/debian/patches/netcf-debian-memleak.patch	1970-01-01 01:00:00.000000000 +0100
+++ netcf-0.1.9/debian/patches/netcf-debian-memleak.patch	2015-04-09 23:03:56.000000000 +0200
@@ -0,0 +1,34 @@
+Leak reported via Natanael Copa on IRC when used by libvirt:
+
+==623== 5,677,056 bytes in 693 blocks are definitely lost in loss record 3,354 of 3,358
+==623== at 0x4C1138C: malloc (vg_replace_malloc.c:270)
+==623== by 0x5B4A9F3: open_memstream (in /lib/libuClibc-0.9.33.2.so)
+==623== by 0x5B485AF: vasprintf (in /lib/libuClibc-0.9.33.2.so)
+==623== by 0x10BE7C8B: ???
+==623== by 0x10BE7EE2: ???
+==623== by 0x10BE8473: ???
+==623== by 0x10BE8A53: ???
+==623== by 0x109BD755: ???
+==623== by 0x109BE47D: ???
+==623== by 0x53450EF: virConnectListDefinedInterfaces (in /home/ncopa/aports/main/libvirt/src/libvirt-1.1.1/src/.libs/libvirt.so.0.1001.1)
+
+Even without symbols, the lone call to vasprintf in drv_debian was
+a pretty blatant leak.
+
+* src/drv_debian.c (interface_deps): Free path when done with it.
+
+Signed-off-by: Eric Blake <eblake at redhat.com>
+---
+ src/drv_debian.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/drv_debian.c
++++ b/src/drv_debian.c
+@@ -138,6 +138,7 @@ static int interface_deps(struct netcf *
+     }
+ 
+     nmatches = aug_match(aug, path, &matches);
++    FREE(path);
+     ERR_COND_BAIL(nmatches < 0, ncf, EOTHER);
+ 
+     if (!nmatches)
diff -Nru netcf-0.1.9/debian/patches/series netcf-0.1.9/debian/patches/series
--- netcf-0.1.9/debian/patches/series	2015-01-15 14:56:26.000000000 +0100
+++ netcf-0.1.9/debian/patches/series	2015-04-09 23:03:56.000000000 +0200
@@ -6,3 +6,4 @@
 0006-drv-debian-ifup-paths.patch
 0007-dont-use-netcf-transaction.patch
 fix_ipcalc_netmask
+netcf-debian-memleak.patch


More information about the Pkg-libvirt-maintainers mailing list