[Xfce4-commits] [xfce/xfce4-settings] 01/01: Fix memory leaks
noreply at xfce.org
noreply at xfce.org
Wed Apr 24 00:18:03 CEST 2019
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-settings.
commit 84ba6c6dedd1d883cc4087b9ce8b59c02d0a6935
Author: Florian Schüller <florian.schueller at gmail.com>
Date: Mon Apr 22 00:24:34 2019 +0200
Fix memory leaks
---
common/display-profiles.c | 3 ++-
common/xfce-randr.c | 5 ++---
dialogs/display-settings/main.c | 6 +++++-
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/common/display-profiles.c b/common/display-profiles.c
index c4b7f78..0274bc4 100644
--- a/common/display-profiles.c
+++ b/common/display-profiles.c
@@ -157,7 +157,7 @@ display_settings_get_profiles (XfceRandr *xfce_randr, XfconfChannel *channel)
profile_match == monitors &&
xfce_randr->noutput == profile_match)
{
- profiles = g_list_prepend (profiles, buf);
+ profiles = g_list_prepend (profiles, g_strdup (buf));
}
/* else don't add the profile to the list */
current = g_list_next (current);
@@ -169,6 +169,7 @@ display_settings_get_profiles (XfceRandr *xfce_randr, XfconfChannel *channel)
}
g_free (display_infos);
g_list_free (channel_contents);
+ g_hash_table_destroy (properties);
return profiles;
}
diff --git a/common/xfce-randr.c b/common/xfce-randr.c
index 98ccb59..0c7c5d4 100644
--- a/common/xfce-randr.c
+++ b/common/xfce-randr.c
@@ -571,9 +571,8 @@ xfce_randr_friendly_name (XfceRandr *randr,
if (g_str_has_prefix (name, "LVDS")
|| g_str_has_prefix (name, "eDP")
|| strcmp (name, "PANEL") == 0)
- return g_strdup (_("Laptop"));
-
- if (info)
+ friendly_name = g_strdup (_("Laptop"));
+ else if (info)
friendly_name = make_display_name (info, output);
g_free (info);
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index e8b44f5..c04757e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -2949,6 +2949,7 @@ on_output_event (FooScrollArea *area,
if (event->type == FOO_BUTTON_PRESS)
{
GrabInfo *info;
+ gchar *tooltip_text;
gtk_combo_box_set_active (GTK_COMBO_BOX (randr_outputs_combobox), output->id);
@@ -2962,7 +2963,9 @@ on_output_event (FooScrollArea *area,
info->output_x = output->x;
info->output_y = output->y;
- set_monitors_tooltip (g_strdup_printf(_("(%i, %i)"), output->x, output->y) );
+ tooltip_text = g_strdup_printf(_("(%i, %i)"), output->x, output->y);
+ set_monitors_tooltip (tooltip_text);
+ g_free (tooltip_text);
output->user_data = info;
}
@@ -3599,6 +3602,7 @@ display_settings_show_main_dialog (GdkDisplay *display)
gtk_main ();
gtk_widget_destroy (dialog);
+ g_free (app);
}
else
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list