diff options
author | Pablo Barciela <[email protected]> | 2019-03-16 17:27:38 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-03-25 21:06:11 +0100 |
commit | 1fa41d259b1f37b4ca4ec64cf10d70c6da364850 (patch) | |
tree | cac1b443c51010869ec62ee557913a36d42abbaf /libmate-desktop | |
parent | c4c06da6d15acc4d0e19df2b97a9f6637dab9171 (diff) | |
download | mate-desktop-1fa41d259b1f37b4ca4ec64cf10d70c6da364850.tar.bz2 mate-desktop-1fa41d259b1f37b4ca4ec64cf10d70c6da364850.tar.xz |
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));
^~~~~~~~~~~~~~~~~
Diffstat (limited to 'libmate-desktop')
-rw-r--r-- | libmate-desktop/mate-bg.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)); } |