summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/dbus-protocol.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-25 23:12:57 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-25 23:12:57 +0200
commit226060be021ca168aba33410b49e89a1f8bf4a00 (patch)
tree0f14c431b635223ea68884b005a3a3e04367f2b9 /avahi-daemon/dbus-protocol.c
parent037ca37a213d9e40258f5ebc3b00113df9f842d1 (diff)
daemon: add some minimal OOM checking against D-Bus
Diffstat (limited to 'avahi-daemon/dbus-protocol.c')
-rw-r--r--avahi-daemon/dbus-protocol.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
index 937e64d..542b5ca 100644
--- a/avahi-daemon/dbus-protocol.c
+++ b/avahi-daemon/dbus-protocol.c
@@ -1017,6 +1017,12 @@ void dbus_protocol_server_state_changed(AvahiServerState state) {
return;
m = dbus_message_new_signal(AVAHI_DBUS_PATH_SERVER, AVAHI_DBUS_INTERFACE_SERVER, "StateChanged");
+
+ if (!m) {
+ avahi_log_error("Failed allocate message");
+ return;
+ }
+
t = (int32_t) state;
if (state == AVAHI_SERVER_COLLISION)