summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2008-01-15 15:49:35 -0500
committerJohn (J5) Palmieri <johnp@redhat.com>2008-01-15 15:49:35 -0500
commit4cc2bfa10e1a840e0da34a588f719779cc284a79 (patch)
treec3151c53bbf6a1ed2c5cbf1849ede20edbe235ea
parent7ba3dc8bf980857e03e0f19713adb918dcab4d15 (diff)
check failed allocation (FDO Bug #12920)
2008-01-15 John (J5) Palmieri <johnp@redhat.com> * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com> * bus/bus.c (setup_server): check failed allocation (FDO Bug #12920)
-rw-r--r--ChangeLog6
-rw-r--r--bus/bus.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index dfa00b17..45471768 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
* patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
+ * bus/bus.c (setup_server): check failed allocation (FDO Bug #12920)
+
+2008-01-15 John (J5) Palmieri <johnp@redhat.com>
+
+ * patch by Kimmo Hämäläinen <kimmo dot hamalainen at nokia dot com>
+
* dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): the API
contract says sitter_p can be NULL, so let's check it (FDO Bug #12919)
diff --git a/bus/bus.c b/bus/bus.c
index 864e48ba..a28a2672 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -208,9 +208,9 @@ setup_server (BusContext *context,
BusServerData *bd;
bd = dbus_new0 (BusServerData, 1);
- if (!dbus_server_set_data (server,
- server_data_slot,
- bd, free_server_data))
+ if (bd == NULL || !dbus_server_set_data (server,
+ server_data_slot,
+ bd, free_server_data))
{
dbus_free (bd);
BUS_SET_OOM (error);