diff options
author | rbuj <[email protected]> | 2021-11-08 12:44:21 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-03-15 18:55:42 +0100 |
commit | 2fbe25e7ad9c7678db2f3e34f76c9ee4e37d80d9 (patch) | |
tree | 5992018877445cfe8303bb22aa8024e15c12844e /libmate-desktop | |
parent | ecf9baac8832edde5e950a70621d2b6c694f9536 (diff) | |
download | mate-desktop-2fbe25e7ad9c7678db2f3e34f76c9ee4e37d80d9.tar.bz2 mate-desktop-2fbe25e7ad9c7678db2f3e34f76c9ee4e37d80d9.tar.xz |
mate-bg: fix memory leak
Diffstat (limited to 'libmate-desktop')
-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 e511975..62cc5e5 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -3197,9 +3197,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; } |