[PATCH] Fix memory leak in yum_db_index_primary_tables()

Tomas Mlcoch tmlcoch at redhat.com
Tue Apr 8 09:08:38 UTC 2014


---
 db.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/db.c b/db.c
index ae9552c..76b3a4a 100644
--- a/db.c
+++ b/db.c
@@ -492,6 +492,7 @@ yum_db_index_primary_tables (sqlite3 *db, GError **err)
         if (i < 2) {
             query = g_strdup_printf(nameindexsql, deps[i], deps[i]);
             rc = sqlite3_exec (db, query, NULL, NULL, NULL);
+            g_free(query);
             if (rc != SQLITE_OK) {
                 g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR,
                              "Can not create %sname index: %s",
-- 
1.8.3.1



More information about the Yum-devel mailing list