diff options
author | rbuj <[email protected]> | 2021-11-08 12:44:21 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2022-08-20 20:02:37 +0000 |
commit | b9a25a4f24ffb23874e0923f63c75149f13b071c (patch) | |
tree | c179e29dde43f830fca2d883ffb07ffc980d8651 | |
parent | d9d67f267e6906f7d2f8212081f32b7d58d4afa2 (diff) | |
download | mate-desktop-b9a25a4f24ffb23874e0923f63c75149f13b071c.tar.bz2 mate-desktop-b9a25a4f24ffb23874e0923f63c75149f13b071c.tar.xz |
mate-bg: fix memory leak
-rw-r--r-- | libmate-desktop/mate-bg.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index 5d32425..e60f013 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -3186,9 +3186,13 @@ mate_bg_changes_with_time (MateBG *bg) if (!bg->filename) return FALSE; - show = get_as_slideshow (bg, bg->filename); - if (show) - return g_queue_get_length (show->slides) > 1; + if ((show = get_as_slideshow (bg, bg->filename)) != NULL) { + gboolean result; + + result = (g_queue_get_length (show->slides) > 1) ? TRUE : FALSE; + slideshow_unref (show); + return result; + } return FALSE; } |