Fix a NULL dereference on an error code path.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69327
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Sviatoslav Chagaev 2013-09-13 18:54:27 +03:00 committed by Simon McVittie
parent 1c95955cbc
commit 01a0bba9f7

View file

@ -478,7 +478,10 @@ _dbus_server_new_for_tcp_socket (const char *host,
if (server == NULL)
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
goto failed_4;
if (noncefile != NULL)
goto failed_4;
else
goto failed_2;
}
_dbus_string_free (&port_str);