Permalink
Browse files

unix: fix uv_freeaddrinfo() segfault on sunos

The system freeaddrinfo() on SunOS does not handle NULL values graciously.
  • Loading branch information...
1 parent 7738306 commit 9da53df457f85a803e1a6645cab40c77581566e5 @bnoordhuis bnoordhuis committed Oct 21, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/unix/core.c
View
@@ -667,7 +667,8 @@ int uv_getaddrinfo(uv_loop_t* loop,
void uv_freeaddrinfo(struct addrinfo* ai) {
- freeaddrinfo(ai);
+ if (ai)
+ freeaddrinfo(ai);
}

0 comments on commit 9da53df

Please sign in to comment.