[tracker-miners/wip/carlosg/coverity-fixes: 18/28] tracker-writeback: Plug leak




commit 3e3f58610651264770f0fb611260d69646f61553
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Oct 24 11:21:43 2021 +0200

    tracker-writeback: Plug leak
    
    The TrackerDBusRequest was not being completed in case of errors.
    
    CID: #365690

 src/tracker-writeback/tracker-writeback.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/tracker-writeback/tracker-writeback.c b/src/tracker-writeback/tracker-writeback.c
index f21055757..41a470f4b 100644
--- a/src/tracker-writeback/tracker-writeback.c
+++ b/src/tracker-writeback/tracker-writeback.c
@@ -420,6 +420,7 @@ handle_method_call_writeback (TrackerController     *controller,
                                                       G_DBUS_ERROR,
                                                       G_DBUS_ERROR_INVALID_ARGS,
                                                       "GVariant does not serialize to a resource");
+               tracker_dbus_request_end (request, NULL);
                return;
        }
 
@@ -429,6 +430,7 @@ handle_method_call_writeback (TrackerController     *controller,
                                                       G_DBUS_ERROR,
                                                       G_DBUS_ERROR_INVALID_ARGS,
                                                       "Resource does not define rdf:type");
+               tracker_dbus_request_end (request, NULL);
                return;
        }
 
@@ -472,6 +474,7 @@ handle_method_call_writeback (TrackerController     *controller,
                                                       TRACKER_DBUS_ERROR,
                                                       TRACKER_DBUS_ERROR_UNSUPPORTED,
                                                       "Resource description does not match any writeback 
modules");
+               tracker_dbus_request_end (request, NULL);
        }
 
        g_object_unref (resource);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]