[PATCHv5 04/28] storage: file: Tolerate NULL src when uninitializing the backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow de-init of null storage sources.
---
 src/storage/storage_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 8c0c5d6..ae86c69 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -2540,7 +2540,7 @@ int storageRegister(void)
 static bool
 virStorageFileIsInitialized(virStorageSourcePtr src)
 {
-    return !!src->drv;
+    return src && src->drv;
 }


-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]