[tracker/wip/carlosg/coverity-warnings: 25/27] libtracker-data: Explicitly check for return value




commit dc380b2f759bc447bb1175fe41797e4c24724756
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Mar 20 13:37:45 2021 +0100

    libtracker-data: Explicitly check for return value
    
    Not really crucial, but as it's done in the other 315 cases...
    
    CID: #1501140

 src/libtracker-data/tracker-sparql.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-sparql.c b/src/libtracker-data/tracker-sparql.c
index 28c73bf6c..7d066f980 100644
--- a/src/libtracker-data/tracker-sparql.c
+++ b/src/libtracker-data/tracker-sparql.c
@@ -9455,13 +9455,17 @@ tracker_sparql_new (TrackerDataManager *manager,
                                           &sparql->parser_error);
        if (tree) {
                TrackerSparqlState state = { 0 };
+               GError *internal_error = NULL;
 
                sparql->tree = tree;
 
                sparql->current_state = &state;
                sparql->current_state->node = tracker_node_tree_get_root (sparql->tree);
                tracker_sparql_init_string_builder (sparql);
-               _call_rule_func (sparql, NAMED_RULE_Query, &sparql->parser_error);
+
+               if (!_call_rule_func (sparql, NAMED_RULE_Query, &internal_error))
+                       g_propagate_error (&sparql->parser_error, internal_error);
+
                sparql->current_state = NULL;
 
                tracker_sparql_state_clear (&state);


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