projects
/
platform
/
core
/
api
/
device.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a2ed28
)
Fix to use g_free() instead of free()
03/244703/1
author
Youngjae Cho
<y0.cho@samsung.com>
Wed, 23 Sep 2020 08:57:50 +0000
(17:57 +0900)
committer
Youngjae Cho
<y0.cho@samsung.com>
Wed, 23 Sep 2020 08:57:50 +0000
(17:57 +0900)
Memory allocated by g_malloc(and such as g_new()) should be matched with
g_free().
Change-Id: Iafc9f5c29ed9d120d312df681f6125e80bc5fbb6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/battery.c
patch
|
blob
|
history
diff --git
a/src/battery.c
b/src/battery.c
index
463576e
..
b628f36
100644
(file)
--- a/
src/battery.c
+++ b/
src/battery.c
@@
-207,9
+207,9
@@
int device_battery_get_info(struct device_battery_info *info)
ret = DEVICE_ERROR_NONE;
out:
- free(status);
- free(health);
- free(power_source);
+
g_
free(status);
+
g_
free(health);
+
g_
free(power_source);
g_variant_unref(output);
return ret;