Fix wrong implementation 04/243704/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 9 Sep 2020 08:08:11 +0000 (17:08 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 9 Sep 2020 08:09:16 +0000 (17:09 +0900)
If the package is not installed, calling __create_rua_info() will be failed.

Change-Id: Ie54e3824504d9f88d034a4ebf7266d21c303ba4c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/rua_info.c

index 372e4ab..42df487 100644 (file)
@@ -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);