[libvirt] [PATCH] Fix Memory Leak in testGetCaps()

Ján Tomko jtomko at redhat.com
Thu Mar 27 06:22:45 UTC 2014


On 03/26/2014 11:37 PM, Nehal J Wani wrote:
> While running qemucaps2xmltest, it was found that valgrind pointed out
> the following memory leaks:
> 
> ==27045== 160 (112 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 51 of 65
> ==27045==    at 0x4A0577B: calloc (vg_replace_malloc.c:593)
> ==27045==    by 0x4C6BACD: virAllocVar (viralloc.c:560)
> ==27045==    by 0x4CAF095: virObjectNew (virobject.c:193)
> ==27045==    by 0x421453: virQEMUCapsNew (qemu_capabilities.c:1805)
> ==27045==    by 0x41F04F: testQemuCapsXML (qemucaps2xmltest.c:72)
> ==27045==    by 0x41FFD1: virtTestRun (testutils.c:201)
> ==27045==    by 0x41EE7A: mymain (qemucaps2xmltest.c:203)
> ==27045==    by 0x42074D: virtTestMain (testutils.c:789)
> ==27045==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
> ==27045== 
> ==27045== 160 (112 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 52 of 65
> ==27045==    at 0x4A0577B: calloc (vg_replace_malloc.c:593)
> ==27045==    by 0x4C6BACD: virAllocVar (viralloc.c:560)
> ==27045==    by 0x4CAF095: virObjectNew (virobject.c:193)
> ==27045==    by 0x421453: virQEMUCapsNew (qemu_capabilities.c:1805)
> ==27045==    by 0x41F04F: testQemuCapsXML (qemucaps2xmltest.c:72)
> ==27045==    by 0x41FFD1: virtTestRun (testutils.c:201)
> ==27045==    by 0x41EEA3: mymain (qemucaps2xmltest.c:204)
> ==27045==    by 0x42074D: virtTestMain (testutils.c:789)
> ==27045==    by 0x3E6CE1ED1C: (below main) (libc-start.c:226)
> 
> ---
>  tests/qemucaps2xmltest.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

ACK and pushed.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140327/415dccbe/attachment-0001.sig>


More information about the libvir-list mailing list