Skip to content

Commit

Permalink
ares__read_line: clear buf pointer on realloc failure
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddrysdale committed Nov 24, 2015
1 parent 4f5ddd8 commit d91d731
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ares__read_line.c
Expand Up @@ -63,6 +63,7 @@ int ares__read_line(FILE *fp, char **buf, size_t *bufsize)
if (!newbuf)
{
ares_free(*buf);
*buf = NULL;
return ARES_ENOMEM;
}
*buf = newbuf;
Expand Down

0 comments on commit d91d731

Please sign in to comment.