]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
storage: file: Tolerate NULL src when uninitializing the backend
authorPeter Krempa <pkrempa@redhat.com>
Mon, 30 Jun 2014 14:24:33 +0000 (16:24 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 8 Jul 2014 12:27:19 +0000 (14:27 +0200)
Allow de-init of null storage sources.

src/storage/storage_driver.c

index 8c0c5d6ac787f8edd8327dcaf89b86747d26bbd9..ae86c69d7bf494b93786b8c86ec45579ae50428c 100644 (file)
@@ -2540,7 +2540,7 @@ int storageRegister(void)
 static bool
 virStorageFileIsInitialized(virStorageSourcePtr src)
 {
-    return !!src->drv;
+    return src && src->drv;
 }