From 379fc7d0aec37c7bc96b9207b480cc7896c85bdd Mon Sep 17 00:00:00 2001
From: =?utf8?q?Pawe=C5=82=20Stawicki?=
Date: Fri, 16 Mar 2018 17:19:05 +0100
Subject: [PATCH] [prevent][35766] Fix for unchecked return value
Change-Id: I5138fda2b7128e8f8bf06621fc6ec4086829d5c0
---
atspi/atspi-misc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 678b566..b36ece0 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -179,6 +179,7 @@ handle_get_bus_address (DBusPendingCall *pending, void *user_data)
DBusMessage *message;
const char *address;
DBusPendingCall *new_pending;
+ dbus_bool_t result;
if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_METHOD_RETURN)
{
@@ -215,9 +216,9 @@ handle_get_bus_address (DBusPendingCall *pending, void *user_data)
"/org/a11y/atspi/cache",
atspi_interface_cache, "GetItems");
- dbus_connection_send_with_reply (app->bus, message, &new_pending, 2000);
+ result = dbus_connection_send_with_reply (app->bus, message, &new_pending, 2000);
dbus_message_unref (message);
- if (!new_pending)
+ if (!result || !new_pending)
return;
dbus_pending_call_set_notify (new_pending, handle_get_items, app, NULL);
}
--
2.7.4