34ba0c5 TOOLS: Fix memory leak after getline() failed

1 file Authored by pcech 8 years ago, Committed by lslebodn 8 years ago,
    TOOLS: Fix memory leak after getline() failed
    
    This patch fixes buffer freeing in case if getline() failed
    in function sss_colondb_readline().
    
    ssize_t getline(char **lineptr, size_t *n, FILE *stream);
    If *lineptr is set to NULL and *n is set 0 before the call, then
    getline() will allocate a buffer for storing the line.  This buffer
    should be freed by the user program even if getline() failed.
        man 3 getline
    
    This patch fix buffer freeing in case if getline() failed.
    
    Resolves:
    https://fedorahosted.org/sssd/ticket/2764
    
    Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
    (cherry picked from commit 2dd75ea79a57615808754c0ce550786edbc17d69)