From de39bcb84fd0749264340b9ee663e50034b48e5b Mon Sep 17 00:00:00 2001 From: Scott Balneaves Date: Thu, 23 Mar 2017 10:36:28 -0500 Subject: Possible fix for https://github.com/mate-desktop/mate-applets/issues/225 fix GError memory leak --- battstat/acpi-linux.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.1