summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2017-03-23 10:36:28 -0500
committerScott Balneaves <[email protected]>2017-03-23 10:36:28 -0500
commitde39bcb84fd0749264340b9ee663e50034b48e5b (patch)
treeaf205140f0e368a1c1449e2ce2ef4f2329d8cd06
parentd3fbdee1c613db0061b4b076e8925bae57beb639 (diff)
downloadmate-applets-de39bcb84fd0749264340b9ee663e50034b48e5b.tar.bz2
mate-applets-de39bcb84fd0749264340b9ee663e50034b48e5b.tar.xz
Possible fix for https://github.com/mate-desktop/mate-applets/issues/225 fix GError memory leak
-rw-r--r--battstat/acpi-linux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/battstat/acpi-linux.c b/battstat/acpi-linux.c
index 2fd9f8e7..1af601c4 100644
--- a/battstat/acpi-linux.c
+++ b/battstat/acpi-linux.c
@@ -350,6 +350,11 @@ gboolean acpi_process_event(struct acpi_info * acpiinfo)
buffer=g_string_new(NULL);
g_io_channel_read_line_string ( acpiinfo->channel,buffer,&i,&gerror);
+ if (gerror != NULL) {
+ g_warning ("%s", gerror->message);
+ g_error_free (gerror);
+ }
+
gboolean result;
evt = parse_acpi_event(buffer);