diff options
| author | Petr Cech <pcech@redhat.com> | 2016-02-18 06:33:53 -0500 |
|---|---|---|
| committer | Lukas Slebodnik <lslebodn@redhat.com> | 2016-02-24 13:51:01 +0100 |
| commit | 2dd75ea79a57615808754c0ce550786edbc17d69 (patch) | |
| tree | 7659de310421ed217114402b4bf10212e1d2c707 /src/python | |
| parent | 6977d7c84145ac69195be58b3330861b9b8a3b72 (diff) | |
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>
Diffstat (limited to 'src/python')
0 files changed, 0 insertions, 0 deletions
