Skip to content
Browse files
[desktop-bg] Fix memory leak during background change events
The string returned by eel_bg_get_desktop_color() needs to be freed by
the caller, which wasn't happening before.

Commit b9cf366 fixed the case where this function was being called
repeatedly, triggering this leak and causing it to rapidly fill system
  • Loading branch information
bitness authored and lukefromdc committed Jul 11, 2018
1 parent 2d179e4 commit 78d9182b75bcf0030a5aed54ecaa927ed797a2d0
Showing with 5 additions and 2 deletions.
  1. +5 −2 libcaja-private/caja-directory-background.c
@@ -323,12 +323,15 @@ desktop_background_changed_cb (EelBackground *background,
static gboolean
desktop_background_prefs_change_event_idle_cb (EelBackground *background)
gchar *desktop_color = NULL;

eel_bg_load_from_gsettings (background,

eel_background_set_color (background,
eel_bg_get_desktop_color (background));
desktop_color = eel_bg_get_desktop_color (background);
eel_background_set_color (background, desktop_color);

g_object_unref (background);

return FALSE; /* remove from the list of event sources */

0 comments on commit 78d9182

Please sign in to comment.