Fix memory leak 26/245226/2
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 5 Oct 2020 23:01:08 +0000 (08:01 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 5 Oct 2020 23:06:30 +0000 (08:06 +0900)
Change-Id: I225cb0ebb67dd0316f09ad094a85c2b4e872c201
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/amd_appinfo.c
src/lib/amd_compinfo.c

index 2f8a107250bc4bf696619c4e27360d330acbabf6..18630e18446bd2361a11bdeaef713145c6d270b3 100644 (file)
@@ -1176,7 +1176,7 @@ static struct user_appinfo *__add_user_appinfo(uid_t uid)
        }
 
        info->uid = uid;
-       info->tbl = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
+       info->tbl = g_hash_table_new_full(g_str_hash, g_str_equal, free,
                        __appinfo_remove_handler);
        if (info->tbl == NULL) {
                _E("out of memory");
index 65e531fa7a26f93f9e0439a2c959bd3a6c1f601f..8d9aff23575a78ac75536e8c74c890cb252e3d28 100644 (file)
@@ -452,7 +452,7 @@ static struct user_compinfo_s *__create_user_compinfo(uid_t uid)
        }
 
        info->uid = uid;
-       info->tbl = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
+       info->tbl = g_hash_table_new_full(g_str_hash, g_str_equal, free,
                        __compinfo_remove_handler);
        if (!info->tbl) {
                _E("Out of memory");