From: Simon McVittie Date: Tue, 18 Jan 2011 16:07:24 +0000 (+0000) Subject: _dbus_listen_tcp_socket: unify cleanup for EADDRINUSE and other failures X-Git-Tag: dbus-1.4.4~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16cc54d95827a3cd3173ff471ca3d36954560a17;p=thirdparty%2Fdbus.git _dbus_listen_tcp_socket: unify cleanup for EADDRINUSE and other failures Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881 --- diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 7635264ff..81040730a 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -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++)