[prevent][38655] Fix for unchecked return value 06/172906/3
authorPaweł Stawicki <p.stawicki@samsung.com>
Fri, 16 Mar 2018 16:32:19 +0000 (17:32 +0100)
committerLukasz Oleksak <l.oleksak@samsung.com>
Tue, 20 Mar 2018 15:10:13 +0000 (15:10 +0000)
Change-Id: I117d7d12d0c2aa9f0ab32c239341ed2d91a5c14a

atspi/atspi-misc.c

index 65003df..678b566 100644 (file)
@@ -229,6 +229,7 @@ get_application (const char *bus_name)
   char *bus_name_dup;
   DBusMessage *message;
   DBusPendingCall *pending = NULL;
+  dbus_bool_t result;
 
   if (!app_hash)
   {
@@ -249,9 +250,9 @@ get_application (const char *bus_name)
   message = dbus_message_new_method_call (bus_name, atspi_path_root,
                                           atspi_interface_application, "GetApplicationBusAddress");
 
-  dbus_connection_send_with_reply (app->bus, message, &pending, 2000);
+  result = dbus_connection_send_with_reply (app->bus, message, &pending, 2000);
   dbus_message_unref (message);
-  if (!pending)
+  if (!result || !pending)
   {
     g_hash_table_remove (app_hash, bus_name_dup);
     return NULL;