1fdac3d virNetSocketNewConnectUNIX: Don't unlink(NULL)

Authored and Committed by mprivozn 9 years ago
    virNetSocketNewConnectUNIX: Don't unlink(NULL)
    
    There is a possibility that we jump onto error label with @lockpath
    still initialized to NULL. Here, the @lockpath should be unlink()-ed,
    but passing there a NULL is not a good idea. Don't do that. In fact,
    we should call unlink() only if we created the lock file successfully.
    
    Reported-by: John Ferlan <jferlan@redhat.com>
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    
        
file modified
+4 -3