Permalink
Browse files

Free memory allocated with g_malloc() using g_free()

  • Loading branch information...
lpereira committed Jun 23, 2018
1 parent 132cc33 commit 3a51ab881647e60a6f8af76a8b111ae2bfe0e3cc
Showing with 2 additions and 2 deletions.
  1. +2 −2 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);
}

0 comments on commit 3a51ab8

Please sign in to comment.