Fix to use g_free() instead of free() 03/244703/1
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 23 Sep 2020 08:57:50 +0000 (17:57 +0900)
committerYoungjae 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

index 463576e..b628f36 100644 (file)
@@ -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;