Fix leak if setsockopt fails

This commit is contained in:
Frederik Deweerdt 2017-05-15 09:14:12 -07:00
parent 97cd8157f7
commit e21c9c6729

1
net.c
View File

@ -357,6 +357,7 @@ addrretry:
n = 1;
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char*) &n,
sizeof(n)) < 0) {
freeaddrinfo(bservinfo);
goto error;
}
}