From cf00858fef7b447e250371588359b72fa535733e Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sat, 16 Mar 2019 17:27:38 +0100 Subject: mate-bg: Fix memory leak Fixes Clang static analyzer warning: mate-bg.c:2764:2: warning: Potential leak of memory pointed to by 'size' g_queue_push_tail (parser->stack, g_strdup (name)); ^~~~~~~~~~~~~~~~~ --- libmate-desktop/mate-bg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index 6465879..bdc93ee 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -2760,6 +2760,8 @@ handle_start_element (GMarkupParseContext *context, strcmp (parser->stack->tail->data, "to") == 0) { slide->file2 = g_slist_prepend (slide->file2, size); } + else + g_free (size); } g_queue_push_tail (parser->stack, g_strdup (name)); } -- cgit v1.2.1