If _dbus_server_new_for_socket() fails, it is the caller's
responsibility to close the fds. All other callers did this.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89104
#ifdef DBUS_ENABLE_LAUNCHD
DBusServer *server;
DBusString address;
- int launchd_fd;
+ int launchd_fd = -1;
launch_data_t sockets_dict, checkin_response;
launch_data_t checkin_request;
launch_data_t listening_fd_array, listening_fd;
return server;
l_failed_0:
+ if (launchd_fd >= 0)
+ close (launchd_fd);
+
_dbus_string_free (&address);
return NULL;