diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2018-06-23 10:22:23 -0700 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2018-09-08 02:29:16 -0700 |
commit | 3a51ab881647e60a6f8af76a8b111ae2bfe0e3cc (patch) | |
tree | 48f3ddf05cc76a0e0f224d25d34ccc67855ba140 /modules/devices/battery.c | |
parent | 132cc33d441ad1dc477d0587cd4e3ae822dd4605 (diff) |
Free memory allocated with g_malloc() using g_free()
Diffstat (limited to 'modules/devices/battery.c')
-rw-r--r-- | modules/devices/battery.c | 4 |
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); } |