about summary refs log tree commit diff stats
path: root/src/uv_link_t.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uv_link_t.c')
-rw-r--r--src/uv_link_t.c3
1 files changed, 2 insertions, 1 deletions
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);
 }