]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: storagefile: Don't pursue backing chain of NULL image
authorPeter Krempa <pkrempa@redhat.com>
Fri, 7 Mar 2014 10:38:18 +0000 (11:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 31 Mar 2014 11:47:50 +0000 (13:47 +0200)
commit6c312b0d1ea9faf8161f0dbaaea67d54ba4c401d
treed40fa0af5f9339c56fc7fafdcb35749c20b4400c
parentce5ec2f1da21e605a9e4ab53ab8b08323c554298
util: storagefile: Don't pursue backing chain of NULL image

When virStorageFileGetMetadata is called with NULL path argument, the
invalid pointer boils down through the recursive worker and is caught by
virHashAddEntry which is thankfully resistant to NULL arguments. As it
doesn't make sense to pursue backing chains of NULL volumes, exit
earlier.

This was noticed in the virt-aahelper-test with a slightly modified
codebase.
src/util/virstoragefile.c