From dd8b1b1d654c983ccc040b59143a11f239de0726 Mon Sep 17 00:00:00 2001 From: Olivier Andrieu Date: Wed, 21 Apr 2004 21:29:07 +0000 Subject: * dbus/dbus-message.c (decode_header_data, decode_string_field): fix incorrect setting of .name_offset in the HeaderField (it was off by two bytes, positioned right after the name and typecode) * bus/bus.c (bus_context_new, bus_context_unref): test before calling dbus_server_free_data_slot and _dbus_user_database_unref in case of an error. * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed by libdbus-gtool. --- bus/bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bus/bus.c') diff --git a/bus/bus.c b/bus/bus.c index 32a5760c..79611548 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -753,7 +753,8 @@ bus_context_new (const DBusString *config_file, if (context != NULL) bus_context_unref (context); - dbus_server_free_data_slot (&server_data_slot); + if (server_data_slot >= 0) + dbus_server_free_data_slot (&server_data_slot); return NULL; } @@ -890,7 +891,8 @@ bus_context_unref (BusContext *context) dbus_free (context->pidfile); } - _dbus_user_database_unref (context->user_database); + if (context->user_database != NULL) + _dbus_user_database_unref (context->user_database); dbus_free (context); -- cgit