c3de387 qemu: Don't update physical storage size of empty drives

Authored and Committed by Peter Krempa 7 years ago
    qemu: Don't update physical storage size of empty drives
    
    Previously the code called virStorageSourceUpdateBlockPhysicalSize which
    did not do anything on empty drives since it worked only on block
    devices. After the refactor in c5f6151390 it's called for all devices
    and thus attempts to deref the NULL path of empty drives.
    
    Add a check that skips the update of the physical size if the storage
    source is empty.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1420718
    
        
file modified
+3 -0