From 226060be021ca168aba33410b49e89a1f8bf4a00 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 25 Jun 2010 23:12:57 +0200 Subject: daemon: add some minimal OOM checking against D-Bus --- avahi-daemon/dbus-protocol.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'avahi-daemon/dbus-protocol.c') 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) -- cgit