From: Peter Krempa Date: Thu, 12 Oct 2017 17:26:10 +0000 (+0200) Subject: util: storagefile: Tolerate NULL path when looking up volume in chain X-Git-Tag: v3.9.0-rc1~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3fb414e77c23a0c454678185516d718ab7044bb;p=thirdparty%2Flibvirt.git util: storagefile: Tolerate NULL path when looking up volume in chain chain->path may be NULL e.g. for NBD drives, so the check needs to avoid dereferencing the path in such case --- diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 59aca2c397..a9d8e59405 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1610,7 +1610,7 @@ virStorageFileChainLookup(virStorageSourcePtr chain, break; } else { if (STREQ_NULLABLE(name, chain->relPath) || - STREQ(name, chain->path)) + STREQ_NULLABLE(name, chain->path)) break; if (nameIsFile && virStorageSourceIsLocalStorage(chain)) {