[tracker] libtracker-db: Fixes memory leak in db statement creation
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] libtracker-db: Fixes memory leak in db statement creation
- Date: Sat, 4 Jul 2009 16:58:43 +0000 (UTC)
commit ba4e64634529d629fd7baefc71a54b2257d9b4f1
Author: Martyn Russell <martyn imendio com>
Date: Sat Jul 4 17:39:18 2009 +0100
libtracker-db: Fixes memory leak in db statement creation
src/libtracker-db/tracker-db-interface.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-interface.c b/src/libtracker-db/tracker-db-interface.c
index 98a65c9..43b507f 100644
--- a/src/libtracker-db/tracker-db-interface.c
+++ b/src/libtracker-db/tracker-db-interface.c
@@ -256,6 +256,8 @@ tracker_db_interface_create_statement (TrackerDBInterface *interface,
const gchar *query,
...)
{
+ TrackerDBStatement *stmt;
+ TrackerDBInterfaceIface *iface;
va_list args;
gchar *str;
@@ -266,8 +268,11 @@ tracker_db_interface_create_statement (TrackerDBInterface *interface,
str = g_strdup_vprintf (query, args);
va_end (args);
- return TRACKER_DB_INTERFACE_GET_IFACE (interface)->create_statement (interface,
- str);
+ iface = TRACKER_DB_INTERFACE_GET_IFACE (interface);
+ stmt = iface->create_statement (interface, str);
+ g_free (str);
+
+ return stmt;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]