[tracker/rss-enclosures] Plug memory leak.



commit de47f02ed5ed83940b1c7779e80ec042dcc2bd88
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Aug 31 17:22:35 2010 +0200

    Plug memory leak.
    
    The journal_mode pragma seems to return a resultset, take and unref it.

 src/libtracker-data/tracker-db-manager.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 7b19ad2..fd67118 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -199,13 +199,16 @@ db_set_params (TrackerDBInterface *iface,
                gint                cache_size,
                gint                page_size)
 {
+	TrackerDBResultSet *result_set;
+
 	tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = OFF;");
 	tracker_db_interface_execute_query (iface, NULL, "PRAGMA count_changes = 0;");
 	tracker_db_interface_execute_query (iface, NULL, "PRAGMA temp_store = FILE;");
 	tracker_db_interface_execute_query (iface, NULL, "PRAGMA encoding = \"UTF-8\"");
 	tracker_db_interface_execute_query (iface, NULL, "PRAGMA auto_vacuum = 0;");
 
-	tracker_db_interface_execute_query (iface, NULL, "PRAGMA journal_mode = WAL;");
+	result_set = tracker_db_interface_execute_query (iface, NULL, "PRAGMA journal_mode = WAL;");
+	g_object_unref (result_set);
 
 	if (page_size != TRACKER_DB_PAGE_SIZE_DONT_SET) {
 		g_message ("  Setting page size to %d", page_size);



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