]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Coverity: Fix resource leak in test driver
authorOsier Yang <jyang@redhat.com>
Wed, 2 May 2012 14:51:36 +0000 (22:51 +0800)
committerOsier Yang <jyang@redhat.com>
Fri, 4 May 2012 02:27:13 +0000 (10:27 +0800)
commitad4d4ad036c80806afbfa108fb2d47bb73497d31
tree2e30e6e30345bbd3af0f049c9bc136cd68e57d27
parente91e0ab6042879a170b22bb942cf4051f8900e46
Coverity: Fix resource leak in test driver

Error: RESOURCE_LEAK:
/builddir/build/BUILD/libvirt-0.9.10/src/test/test_driver.c:1041: alloc_arg: Calling allocation function "virXPathNodeSet" on "devs".
/builddir/build/BUILD/libvirt-0.9.10/src/util/xml.c:621: alloc_arg: "virAllocN" allocates memory that is stored into "*list".
/builddir/build/BUILD/libvirt-0.9.10/src/util/memory.c:129: alloc_fn: Storage is returned from allocation function "calloc".
/builddir/build/BUILD/libvirt-0.9.10/src/util/memory.c:129: var_assign: Assigning: "*((void **)ptrptr)" = "calloc(count, size)".
/builddir/build/BUILD/libvirt-0.9.10/src/util/xml.c:625: noescape: Variable "*list" is not freed or pointed-to in function "memcpy".
/builddir/build/BUILD/libvirt-0.9.10/src/test/test_driver.c:1098: leaked_storage: Variable "devs" going out of scope leaks the storage it points to.
src/test/test_driver.c