_dbus_listen_tcp_socket: free listen_fd in the error case

Origin: vendor, Maemo
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Bug-NB: NB#180486
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Christian Dywan 2011-01-18 16:00:05 +00:00 committed by Simon McVittie
parent 4e411da35f
commit 40b1fc5fff

View file

@ -1438,6 +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;
}