Skip to content
Snippets Groups Projects
Commit b730f0e1 authored by deuce's avatar deuce
Browse files

Set res=NULL after calling freeaddrinfo().

Fixes crash on OS X (and double-free everywhere else) after a getaddrinfo()
succeeds, but the connect fails after returning EWOULDBLOCK/EAGAIN/etc.

Reported by Michael Montague (thanks!)
parent 7838c53d
No related branches found
No related tags found
No related merge requests found
......@@ -494,6 +494,7 @@ int conn_socket_connect(struct bbslist *bbs)
connected:
freeaddrinfo(res);
res=NULL;
nonblock=0;
ioctlsocket(sock, FIONBIO, &nonblock);
if(!socket_check(sock, NULL, NULL, 0)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment