[tracker] Plug memory leak.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Plug memory leak.
- Date: Tue, 31 Aug 2010 15:26:51 +0000 (UTC)
commit 6da3db62c1c1991af0b307b19159d68e5eabdb91
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]