diff options
author | sanghyeok.oh <sanghyeok.oh@samsung.com> | 2020-06-08 13:33:12 +0900 |
---|---|---|
committer | sanghyeok oh <sanghyeok.oh@samsung.com> | 2020-06-08 04:31:47 +0000 |
commit | d22b7e11e4bff39079a5e040130856cf46a0aeb2 (patch) | |
tree | 82b3a1ee42c152d6af8edaec5c14060aa3d382e6 | |
parent | f61bb48fdd7d46e49b6f0b0bb23ab7fc7c67b1f5 (diff) | |
download | batterymonitor-plugins-d22b7e11e4bff39079a5e040130856cf46a0aeb2.tar.gz batterymonitor-plugins-d22b7e11e4bff39079a5e040130856cf46a0aeb2.tar.bz2 batterymonitor-plugins-d22b7e11e4bff39079a5e040130856cf46a0aeb2.zip |
Change-Id: I2cfcdb00e5381697958e490892285d89ae6798a8
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
-rw-r--r-- | plugin/display/src/bm_display_plugin.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/display/src/bm_display_plugin.c b/plugin/display/src/bm_display_plugin.c index c62a81b..ab5b321 100644 --- a/plugin/display/src/bm_display_plugin.c +++ b/plugin/display/src/bm_display_plugin.c @@ -138,6 +138,8 @@ static bm_display_st *_variant_to_bds(GVariant *param) while (g_variant_iter_loop(sub_iter, "(su)", &app_id, &app_time)) { atm = (app_time_map_st1 *)malloc(sizeof(app_time_map_st1)); if (!atm) { + g_free(app_id); + g_variant_iter_free(sub_iter); _E("failed to allocate memory"); goto err; } @@ -150,8 +152,9 @@ static bm_display_st *_variant_to_bds(GVariant *param) bds = (bm_display_st *)malloc(sizeof(bm_display_st)); if (!bds) { - _E("failed to allocate memory"); + g_variant_iter_free(sub_iter); g_slist_free_full(atm_list, _atm_list_free); + _E("failed to allocate memory"); goto err; } |