diff options
author | rbuj <[email protected]> | 2022-02-07 14:04:48 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-09 15:27:56 +0200 |
commit | ea6c469c6b78904bfed165ce9778bcb68ff0d22f (patch) | |
tree | 7fecf22966ff6e220cf5e70a6c805ce01a7647ae | |
parent | 2354716a4224982e51c580b172580814fbd362f7 (diff) | |
download | mate-applets-ea6c469c6b78904bfed165ce9778bcb68ff0d22f.tar.bz2 mate-applets-ea6c469c6b78904bfed165ce9778bcb68ff0d22f.tar.xz |
multiload: fix memory leak
-rw-r--r-- | multiload/src/properties.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/multiload/src/properties.c b/multiload/src/properties.c index 37cc8bf2..6eea922d 100644 --- a/multiload/src/properties.c +++ b/multiload/src/properties.c @@ -526,12 +526,13 @@ read_color_button (GtkWidget *widget, GdkRGBA color; gchar *color_string; - if ((color_string = g_settings_get_string (settings, key)) != NULL) { + color_string = g_settings_get_string (settings, key); + if (*color_string != '\0') { gdk_rgba_parse (&color, color_string); - g_free (color_string); } else { gdk_rgba_parse (&color, "#000000"); } + g_free (color_string); gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (widget), &color); if (!g_settings_is_writable (settings, key)) |