]> xenbits.xensource.com Git - libvirt.git/commit
util: storage: Fix crash of libvirtd on network backed guest block-pull
authorPeter Krempa <pkrempa@redhat.com>
Thu, 29 May 2014 14:46:38 +0000 (16:46 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 29 May 2014 14:51:05 +0000 (16:51 +0200)
commit4a051b807ec35d2b0aab125add19edb6d769bddb
treea1dddbc6d3f4efa9c21ff21940f11efd81f6f04c
parent26d43113a3326c90ec52548a16111fd8ab237bae
util: storage: Fix crash of libvirtd on network backed guest block-pull

For guests backed by gluster volumes (or other network storage) we don't
fill the backing chain (see qemuDomainDetermineDiskChain). This leaves
the "relPath" field of the top image NULL. This causes a crash in
virStorageFileChainLookup() when looking up a backing element for such a
disk.

Since I'm working on adding support for network storage and one of the
steps will make the "relPath" field optional let's use STREQ_NULLABLE
instead of STREQ in virStorageFileChainLookup() to avoid the problem.
src/util/virstoragefile.c