6955621 storage: On error unlink created file in virFileOpen{As|Forked}

Authored and Committed by John Ferlan 8 years ago
    storage: On error unlink created file in virFileOpen{As|Forked}
    
    After a successful creation of a file, if some other call results
    in returning a failure, let's unlink the file we created to prevent
    another round trip or confusion in the caller. In particular, this
    function can be called during a storage backend buildVol, so in order
    to ensure that caller doesn't need to distinguish between failed create
    or some other failure after create, just remove the volume we created.
    
    Signed-off-by: John Ferlan <jferlan@redhat.com>
    
        
file modified
+23 -3