]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
node device: Fix locking issue in virNodeDeviceDestroy
authorCole Robinson <crobinso@redhat.com>
Wed, 14 Oct 2009 20:15:13 +0000 (16:15 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 20 Oct 2009 18:17:34 +0000 (14:17 -0400)
Certain error paths won't unlock the node device object.

src/node_device/node_device_driver.c

index 14b309898b6838df4774af678ab4912b32299bde..21a4c8de30bc60b0bd0cbc90c981dc0feb2244fd 100644 (file)
@@ -720,6 +720,8 @@ nodeDeviceDestroy(virNodeDevicePtr dev)
     }
 
 out:
+    if (obj)
+        virNodeDeviceObjUnlock(obj);
     VIR_FREE(parent_name);
     VIR_FREE(wwnn);
     VIR_FREE(wwpn);