From 60048931e054a39120edba1cb6531d72e803be60 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Stawicki?= Date: Fri, 16 Mar 2018 17:01:03 +0100 Subject: [PATCH] [prevent][36018] Fix for unchecked return value Change-Id: I79eba8a9907b44a0ea349eaab0ab2704284a200f --- registryd/deviceeventcontroller.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index a7d3769..fedf927 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -933,6 +933,7 @@ send_and_allow_reentry (DBusConnection *bus, DBusMessage *message, int timeout, { const char *dest = dbus_message_get_destination (message); GSList *l; + dbus_bool_t result; gchar *bus_name_dup; dbus_message_ref (message); dbus_pending_call_set_notify (pending, reset_hung_process, message, @@ -942,9 +943,9 @@ send_and_allow_reentry (DBusConnection *bus, DBusMessage *message, int timeout, "Ping"); if (!message) return NULL; - dbus_connection_send_with_reply (bus, message, &pending, -1); + result = dbus_connection_send_with_reply (bus, message, &pending, -1); dbus_message_unref (message); - if (!pending) + if (!result || !pending) return NULL; bus_name_dup = g_strdup (dest); dbus_pending_call_set_notify (pending, reset_hung_process_from_ping, -- 2.7.4