From: David Mansfield Date: Thu, 17 Sep 2015 12:59:24 +0000 (-0400) Subject: test driver: don't unlock pool after freeing it X-Git-Tag: v1.2.18.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d2cf485324d82bb79f2d4a2dbc1b676bcb12395;p=thirdparty%2Flibvirt.git test driver: don't unlock pool after freeing it Invalid read of size 4 at 0x945CA30: __pthread_mutex_unlock_full (in /lib64/libpthread-2.20.so) by 0x4F0404B: virMutexUnlock (virthread.c:94) by 0x4F7161B: virStoragePoolObjUnlock (storage_conf.c:2603) by 0x4FE0476: testStoragePoolUndefine (test_driver.c:4328) by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656) by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721) by 0x12F48D: vshCommandRun (vsh.c:1212) by 0x132AA7: main (virsh.c:943) Address 0xfda56a0 is 16 bytes inside a block of size 104 free'd at 0x4C2BA6C: free (vg_replace_malloc.c:473) by 0x4EA5C96: virFree (viralloc.c:582) by 0x4F70B69: virStoragePoolObjFree (storage_conf.c:412) by 0x4F7167B: virStoragePoolObjRemove (storage_conf.c:437) by 0x4FE0468: testStoragePoolUndefine (test_driver.c:4323) by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656) by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721) by 0x12F48D: vshCommandRun (vsh.c:1212) by 0x132AA7: main (virsh.c:943) (cherry picked from commit 03cf57a37df750da46289b0f8aeac6463d521785) --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 213a9a1218..90ab09f723 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4321,6 +4321,7 @@ testStoragePoolUndefine(virStoragePoolPtr pool) } virStoragePoolObjRemove(&privconn->pools, privpool); + privpool = NULL; ret = 0; cleanup: