From 92dceb07cec46f8d41f75e85c2771d01c579ac32 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Wed, 9 Sep 2020 17:08:11 +0900 Subject: [PATCH] Fix wrong implementation If the package is not installed, calling __create_rua_info() will be failed. Change-Id: Ie54e3824504d9f88d034a4ebf7266d21c303ba4c Signed-off-by: Hwankyu Jhun --- src/rua_info.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/rua_info.c b/src/rua_info.c index 372e4ab..42df487 100644 --- a/src/rua_info.c +++ b/src/rua_info.c @@ -591,13 +591,8 @@ int rua_info_usr_foreach(uid_t uid, rua_manager_rua_info_cb callback, for (row = 0; row < nrows; ++row) { rua_history_get_rec(&rec, table, nrows, ncols, row); info = __create_rua_info(&rec); - if (!info) { - rua_history_unload_db(&table); - g_list_free_full(list, __destroy_rua_info); - return RUA_ERROR_OUT_OF_MEMORY; - } - - list = g_list_append(list, info); + if (info) + list = g_list_append(list, info); } rua_history_unload_db(&table); -- 2.7.4