]> xenbits.xensource.com Git - libvirt.git/commit
storage_driver: Don't crash in storagePoolCreateXML
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 23 Aug 2019 13:11:20 +0000 (15:11 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 23 Aug 2019 13:33:47 +0000 (15:33 +0200)
commit9935b435dfee4d130197ee62ae64880ccbcf1855
tree87365f1f13e771b06d7f802b343f8b51b0c64d01
parent277c8c4c9b39a2d26fd8dbd30281dfb5c0de483d
storage_driver: Don't crash in storagePoolCreateXML

In my recent patches I've introduced
virStoragePoolObjIsStarting() which is then used to protect
storage pool definition when the pool object is locked and
unlocked during long running jobs. Well, my patches did not
anticipate that @obj can be NULL under 'cleanup' label in
storagePoolCreateXML() (for instance when parsing XML fails).
This imperfection is causing libvirtd to crash then.

Fixes: 13284a6b83 storage_driver: Protect pool def during startup and build
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/storage/storage_driver.c