_dbus_listen_tcp_socket: unify cleanup for EADDRINUSE and other failures

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
This commit is contained in:
Simon McVittie 2011-01-18 16:07:24 +00:00
parent 40b1fc5fff
commit 16cc54d958

View file

@ -1438,8 +1438,7 @@ _dbus_listen_tcp_socket (const char *host,
dbus_set_error (error, _dbus_error_from_errno (errno),
"Failed to bind socket \"%s:%s\": %s",
host ? host : "*", port, _dbus_strerror (errno));
dbus_free (listen_fd);
return -1;
goto failed;
}
for (i = 0 ; i < nlisten_fd ; i++)