summaryrefslogtreecommitdiff
path: root/bus/bus.c
diff options
context:
space:
mode:
authorOlivier Andrieu <oliv__a@users.sourceforge.net>2004-04-21 21:29:07 +0000
committerOlivier Andrieu <oliv__a@users.sourceforge.net>2004-04-21 21:29:07 +0000
commitdd8b1b1d654c983ccc040b59143a11f239de0726 (patch)
tree760f61c747accc76c42f16e60d68ef980d43623e /bus/bus.c
parente5bc30a52c77b3dbfea084b4bd28c4afe541ddd7 (diff)
* 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.
Diffstat (limited to 'bus/bus.c')
-rw-r--r--bus/bus.c6
1 files changed, 4 insertions, 2 deletions
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);