From: Paweł Stawicki
Date: Fri, 16 Mar 2018 16:19:05 +0000 (+0100)
Subject: [prevent][35766] Fix for unchecked return value
X-Git-Tag: accepted/tizen/unified/20180405.005254~8
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F172905%2F3;p=platform%2Fupstream%2Fat-spi2-core.git
[prevent][35766] Fix for unchecked return value
Change-Id: I5138fda2b7128e8f8bf06621fc6ec4086829d5c0
---
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);
}