[libvirt] [PATCH] test driver: don't unlock pool after freeing it

David Mansfield libvirt at dm.cobite.com
Wed Sep 16 21:14:28 UTC 2015

The attached patch (taken from my modified Fedora 22 source rpm,, sorry),  fixes a case where, in the test driver, memory 
is accessed after it's freed.

Patch applies to latest git with:

Hunk #1 succeeded at 4395 (offset -469 lines).

The illegal access was found using valgrind.

The function testStoragePoolUndefine() calls virStoragePoolObjRemove() 
(which seems to free the memory for that pool structure) and then in the 
cleanup stanza calls virStoragePoolObjUnlock() which tampers with the 
freed structure.

David Mansfield
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-don-t-unlock-after-free.patch
Type: text/x-patch
Size: 803 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150916/d0f47ba4/attachment-0001.bin>

More information about the libvir-list mailing list