diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2020-09-09 17:08:11 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2020-09-09 17:09:16 +0900 |
commit | 92dceb07cec46f8d41f75e85c2771d01c579ac32 (patch) | |
tree | 82e88d71fc1e614856088f4b1616ffa46a649ab1 | |
parent | 8c6480131e1cf29e4ac0bae791918291e0559d41 (diff) | |
download | librua-92dceb07cec46f8d41f75e85c2771d01c579ac32.tar.gz librua-92dceb07cec46f8d41f75e85c2771d01c579ac32.tar.bz2 librua-92dceb07cec46f8d41f75e85c2771d01c579ac32.zip |
Fix wrong implementation
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>
-rw-r--r-- | src/rua_info.c | 9 |
1 files 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); |