From 03cf57a37df750da46289b0f8aeac6463d521785 Mon Sep 17 00:00:00 2001 From: David Mansfield Date: Sep 21 2015 17:32:39 +0000 Subject: 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) --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 213a9a1..90ab09f 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: