Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Commit

Permalink
Free buffer even in error case
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilm committed Sep 29, 2016
1 parent ec8225e commit af639ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions code/dns/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ void on_read(uv_stream_t *client, ssize_t nread, const uv_buf_t *buf) {
if (nread != UV_EOF)
fprintf(stderr, "Read error %s\n", uv_err_name(nread));
uv_close((uv_handle_t*) client, NULL);
free(buf->base);
free(client);
return;
}
Expand Down

0 comments on commit af639ed

Please sign in to comment.