jhrozek / libuser

Forked from libuser 5 years ago
Clone

e553684 editing_open: close fd after we've established its validity

Authored and Committed by jhrozek 5 years ago
    editing_open: close fd after we've established its validity
    
    Merges:
    https://pagure.io/libuser/issue/26
    
    The code used to first close(fd) and only then check if it's != -1.
    Reverse the logic so that the fd is only closed if valid.
    
        
file modified
+1 -1