src/net_socket.c bind_to_address(): Use after free in error path.

This commit is contained in:
Sven-Haegar Koch 2011-05-29 21:35:31 +02:00 committed by Guus Sliepen
parent 5bc957074a
commit 82109868b5

View file

@ -137,9 +137,9 @@ static bool bind_to_address(connection_t *c) {
status = getaddrinfo(node, /* service = */ NULL,
&ai_hints, &ai_list);
if(status) {
free(node);
logger(LOG_WARNING, "Error looking up %s port %s: %s",
node, "any", gai_strerror(status));
free(node);
return false;
}
assert(ai_list != NULL);