]> xenbits.xensource.com Git - libvirt.git/commit
conf: Fix memory leaks in virStoragePoolDefParseSource
authorAlex Jia <ajia@redhat.com>
Wed, 9 May 2012 10:48:46 +0000 (18:48 +0800)
committerAlex Jia <ajia@redhat.com>
Thu, 10 May 2012 01:28:24 +0000 (09:28 +0800)
commit15e0b20acd4b491e5410bc54a2163b7b16535d69
treecb37c86fc73d5118c6a02475a225eb51438a496c
parent5c650b98ced19bcb344a20011f4923a9626331e9
conf: Fix memory leaks in virStoragePoolDefParseSource

Detected by valgrind. Leaks are introduced in commit 122fa379.

src/conf/storage_conf.c: fix memory leaks.

How to reproduce?
$ make && make -C tests check TESTS=storagepoolxml2xmltest
$ cd tests && valgrind -v --leak-check=full ./storagepoolxml2xmltest

actual result:
==28571== LEAK SUMMARY:
==28571==    definitely lost: 40 bytes in 5 blocks
==28571==    indirectly lost: 0 bytes in 0 blocks
==28571==      possibly lost: 0 bytes in 0 blocks
==28571==    still reachable: 1,054 bytes in 21 blocks
==28571==         suppressed: 0 bytes in 0 blocks

Signed-off-by: Alex Jia <ajia@redhat.com>
src/conf/storage_conf.c