From 9acfc394187389786e64cabd1b53a25debe24035 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Fri, 28 Oct 2022 09:27:52 +0900 Subject: [PATCH] Fix to wrong free filter list Change-Id: I622976537046751cf871902a59e58998db20f253 Signed-off-by: Changgyu Choi --- src/server/database/db_handle_provider.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/database/db_handle_provider.cc b/src/server/database/db_handle_provider.cc index 07b6105..fb14e54 100644 --- a/src/server/database/db_handle_provider.cc +++ b/src/server/database/db_handle_provider.cc @@ -592,7 +592,6 @@ bool DBHandleProvider::UpdatePendingPackageInfo(sqlite3* db, pkginfo_internal_filter_get_list(db, &tmp_filter, uid_, locale.c_str(), list); } - g_slist_free(tmp_filter.list); GHashTableIter iter; gpointer value; @@ -620,6 +619,7 @@ bool DBHandleProvider::UpdatePendingPackageInfo(sqlite3* db, } g_hash_table_destroy(list); + g_slist_free(tmp_filter.list); pending_pkg_.erase(pid); return true; } @@ -670,6 +670,7 @@ bool DBHandleProvider::UpdateCachePkg(sqlite3* db, uid_t uid, } } + g_hash_table_destroy(list); g_slist_free(tmp_filter.list); return true; } -- 2.7.4