aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2018-06-23 10:22:23 -0700
committerLeandro Pereira <leandro@hardinfo.org>2018-09-08 02:29:16 -0700
commit3a51ab881647e60a6f8af76a8b111ae2bfe0e3cc (patch)
tree48f3ddf05cc76a0e0f224d25d34ccc67855ba140
parent132cc33d441ad1dc477d0587cd4e3ae822dd4605 (diff)
Free memory allocated with g_malloc() using g_free()
-rw-r--r--modules/devices/battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/devices/battery.c b/modules/devices/battery.c
index cbcebb12..9994cfd8 100644
--- a/modules/devices/battery.c
+++ b/modules/devices/battery.c
@@ -229,11 +229,11 @@ read_contents(const gchar *base, const gchar *key)
return NULL;
if (!g_file_get_contents(path, &value, NULL, NULL)) {
- free(path);
+ g_free(path);
return NULL;
}
- free(path);
+ g_free(path);
return g_strchomp(value);
}