summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSviatoslav Chagaev <sviatoslav.chagaev@gmail.com>2013-09-13 18:54:27 +0300
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-09-16 12:47:27 +0100
commit01a0bba9f76f125ba3616e8ddb131a127b863273 (patch)
treeefa4e3a1240e3209403f025d277be714e0d023e7
parent1c95955cbc6e816dd50a9d66846c11b44d703a1f (diff)
downloaddbus-01a0bba9f76f125ba3616e8ddb131a127b863273.tar.gz
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>
-rw-r--r--dbus/dbus-server-socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c
index ae4b602e..3209ceba 100644
--- a/dbus/dbus-server-socket.c
+++ b/dbus/dbus-server-socket.c
@@ -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);