[tracker/wip/carlosg/coverity-fixes: 11/16] libtracker-data: Free query variable earlier
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/coverity-fixes: 11/16] libtracker-data: Free query variable earlier
- Date: Sat, 23 Oct 2021 18:42:01 +0000 (UTC)
commit 7e3159c8ca6ab248e66eccdb595754fa918e54fd
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Oct 23 14:04:53 2021 +0200
libtracker-data: Free query variable earlier
This was being leaked in case of error.
CID: #1501124
src/libtracker-data/tracker-data-manager.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 05f800028..b7f855cdf 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3272,13 +3272,12 @@ create_decomposed_metadata_tables (TrackerDataManager *manager,
TRACKER_NOTE (ONTOLOGY_CHANGES, g_message ("Copy supported nlr:maxCardinality
change: %s", query));
tracker_db_interface_execute_query (iface, &internal_error, "%s", query);
+ g_free (query);
if (internal_error) {
g_propagate_error (error, internal_error);
goto error_out;
}
-
- g_free (query);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]