ares__read_line: clear buf pointer on realloc failure

pull/31/head
David Drysdale 9 years ago
parent 02e1f7f9af
commit 68a938e771
  1. 1
      ares__read_line.c

@ -63,6 +63,7 @@ int ares__read_line(FILE *fp, char **buf, size_t *bufsize)
if (!newbuf) if (!newbuf)
{ {
free(*buf); free(*buf);
*buf = NULL;
return ARES_ENOMEM; return ARES_ENOMEM;
} }
*buf = newbuf; *buf = newbuf;

Loading…
Cancel
Save