Change free function for GSList 09/167109/2
authorSeungha Son <seungha.son@samsung.com>
Mon, 15 Jan 2018 10:57:05 +0000 (19:57 +0900)
committerSeungha Son <seungha.son@samsung.com>
Wed, 17 Jan 2018 10:54:48 +0000 (10:54 +0000)
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Ia4a369a88c1387058ec95e443d8cfeb89e362808

src/pkgmgrinfo_updateinfo.c

index e796885..e1bcc6a 100644 (file)
@@ -332,7 +332,7 @@ API int pkgmgrinfo_updateinfo_usr_foreach_updateinfo(uid_t uid,
        ret = _get_pkg_updateinfo_from_db(NULL, &info_list, uid);
        if (ret != 0) {
                _LOGE("Failed to get pkg update info for user[%d]", (int)uid);
-               pkgmgrinfo_updateinfo_destroy(info_list);
+               g_slist_free_full(info_list, __free_update_info);
                return PMINFO_R_ERROR;
        }
 
@@ -340,7 +340,7 @@ API int pkgmgrinfo_updateinfo_usr_foreach_updateinfo(uid_t uid,
        if (ret != 0) {
                _LOGE("Failed to get pkg update info for user[%d]",
                                (int)GLOBAL_USER);
-               pkgmgrinfo_updateinfo_destroy(info_list);
+               g_slist_free_full(info_list, __free_update_info);
                return PMINFO_R_ERROR;
        }