]> xenbits.xensource.com Git - libvirt.git/commitdiff
test driver: don't unlock pool after freeing it
authorDavid Mansfield <dmansfield@gmail.com>
Thu, 17 Sep 2015 12:59:24 +0000 (08:59 -0400)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 21 Sep 2015 17:32:39 +0000 (19:32 +0200)
 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)

src/test/test_driver.c

index 213a9a12189b6ce281ed0aa9a7eda4af75072ca0..90ab09f723048a58f42756e26bad315826b23285 100644 (file)
@@ -4321,6 +4321,7 @@ testStoragePoolUndefine(virStoragePoolPtr pool)
     }
 
     virStoragePoolObjRemove(&privconn->pools, privpool);
+    privpool = NULL;
     ret = 0;
 
  cleanup: