[tracker/wip/carlosg/bus-fixes: 2/2] libtracker-sparql/bus: Check return value of g_dbus_message_to_error()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [tracker/wip/carlosg/bus-fixes: 2/2] libtracker-sparql/bus: Check return value of g_dbus_message_to_error()
- Date: Tue, 19 Jul 2022 18:04:59 +0000 (UTC)
commit edbbea3c670a9e20f96776c908cd86d47cb7ec3a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jul 19 18:57:29 2022 +0200
    libtracker-sparql/bus: Check return value of g_dbus_message_to_error()
    
    Like it's done in every other place. Fixes a rather moot Coverity issue.
    
    CID: #1518979
 src/libtracker-sparql/bus/tracker-bus.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-sparql/bus/tracker-bus.c b/src/libtracker-sparql/bus/tracker-bus.c
index 7dcf645c6..9b97cae9c 100644
--- a/src/libtracker-sparql/bus/tracker-bus.c
+++ b/src/libtracker-sparql/bus/tracker-bus.c
@@ -1254,13 +1254,12 @@ deserialize_cb (GObject      *source,
 
        reply = g_dbus_connection_send_message_with_reply_finish (G_DBUS_CONNECTION (source),
                                                                  res, &error);
-       if (reply)
-               g_dbus_message_to_gerror (reply, &error);
+       if (!reply || g_dbus_message_to_gerror (reply, &error))
+               data->dbus.error = error;
 
        g_clear_object (&reply);
 
        data->dbus.finished = TRUE;
-       data->dbus.error = error;
        check_finish_deserialize (task);
 }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]