diff options
author | Scott Balneaves <[email protected]> | 2017-03-23 10:36:28 -0500 |
---|---|---|
committer | Scott Balneaves <[email protected]> | 2017-03-23 10:36:28 -0500 |
commit | de39bcb84fd0749264340b9ee663e50034b48e5b (patch) | |
tree | af205140f0e368a1c1449e2ce2ef4f2329d8cd06 | |
parent | d3fbdee1c613db0061b4b076e8925bae57beb639 (diff) | |
download | mate-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.c | 5 |
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); |