unix: fix dangling pointer free() bug

This commit is contained in:
Ben Noordhuis 2011-09-19 17:22:38 +02:00
parent 70e1032094
commit 37e8bf2556

View File

@ -634,6 +634,9 @@ int uv_getaddrinfo(uv_loop_t* loop,
handle->hints = malloc(sizeof(struct addrinfo));
memcpy(&handle->hints, hints, sizeof(struct addrinfo));
}
else {
handle->hints = NULL;
}
/* TODO security! check lengths, check return values. */