From 48adacf130c09e96cf1fd7c391d4584c86644812 Mon Sep 17 00:00:00 2001 From: mbkma Date: Thu, 25 Mar 2021 22:37:05 +0100 Subject: mate-notification-properties.c: fix memory leaks --- src/capplet/mate-notification-properties.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c index 8514ee9..8de6fa1 100644 --- a/src/capplet/mate-notification-properties.c +++ b/src/capplet/mate-notification-properties.c @@ -70,7 +70,7 @@ static void notification_properties_position_notify(GSettings *settings, gchar * { GtkTreeModel* model; GtkTreeIter iter; - const char *location; + char *location; gboolean valid; location = g_settings_get_string(dialog->gsettings, key); @@ -90,8 +90,10 @@ static void notification_properties_position_notify(GSettings *settings, gchar * g_free(it_key); break; } - g_free (it_key); + g_free(it_key); } + + g_free(location); } static void notification_properties_monitor_changed(GtkComboBox* widget, NotificationAppletDialog* dialog) @@ -241,7 +243,7 @@ static void notification_properties_dialog_setup_monitors(NotificationAppletDial static void notification_properties_theme_notify(GSettings *settings, gchar *key, NotificationAppletDialog* dialog) { - const char* theme = g_settings_get_string(dialog->gsettings, key); + char* theme = g_settings_get_string(dialog->gsettings, key); GtkTreeModel* model = gtk_combo_box_get_model(GTK_COMBO_BOX(dialog->theme_combo)); @@ -263,6 +265,8 @@ static void notification_properties_theme_notify(GSettings *settings, gchar *key g_free(theme_name); } + + g_free(theme); } static void notification_properties_theme_changed(GtkComboBox* widget, NotificationAppletDialog* dialog) -- cgit v1.2.1