projects
/
platform
/
core
/
system
/
deviced.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4ef132
)
Fix memory leak
01/229901/1
author
INSUN PYO
<insun.pyo@samsung.com>
Mon, 6 Apr 2020 09:59:14 +0000
(18:59 +0900)
committer
INSUN PYO
<insun.pyo@samsung.com>
Mon, 6 Apr 2020 09:59:32 +0000
(18:59 +0900)
Change-Id: Ie6867273e859f2b8bf107d39afa62fad2cc19097
src/auto-test/battery-monitor-test.c
patch
|
blob
|
history
diff --git
a/src/auto-test/battery-monitor-test.c
b/src/auto-test/battery-monitor-test.c
index
6493648
..
3b6c1a7
100644
(file)
--- a/
src/auto-test/battery-monitor-test.c
+++ b/
src/auto-test/battery-monitor-test.c
@@
-143,6
+143,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;
}
@@
-157,6
+159,7
@@
static bm_display_st *_variant_to_bds(GVariant *param)
if (!bds) {
_E("failed to allocate memory");
g_slist_free_full(atm_list, _atm_list_free);
+ g_variant_iter_free(sub_iter);
goto err;
}