From 28facffd6105b2da1699922bf2cbc545aa1cceae Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 27 May 2016 11:59:14 -0400 Subject: uv_link_t: do not crash on NULL buf --- src/uv_link_t.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/uv_link_t.c') diff --git a/src/uv_link_t.c b/src/uv_link_t.c index 319a2e4..08b5064 100644 --- a/src/uv_link_t.c +++ b/src/uv_link_t.c @@ -18,7 +18,8 @@ static void uv_link_def_alloc_cb(uv_link_t* link, static void uv_link_def_read_cb(uv_link_t* link, ssize_t nread, const uv_buf_t* buf) { - free(buf->base); + if (buf != NULL) + free(buf->base); } -- cgit 1.4.1-2-gfad0