From: Peter Krempa Date: Mon, 30 Jun 2014 14:24:33 +0000 (+0200) Subject: storage: file: Tolerate NULL src when uninitializing the backend X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=96e00c4fc1f9ae629b6a9ffa260e52a6426e2676;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git storage: file: Tolerate NULL src when uninitializing the backend Allow de-init of null storage sources. --- diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 8c0c5d6ac..ae86c69d7 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; }