Commit 615f57f4 authored by Jan Ziak's avatar Jan Ziak Committed by Simon Steinbeiß

Fix xfconf-related memory leaks

Signed-off-by: Jan Ziak's avatarJan Ziak <0xe2.0x9a.0x9b@gmail.com>
parent ff0c6733
Pipeline #841 passed with stages
in 3 minutes and 12 seconds
......@@ -53,6 +53,7 @@ display_settings_profile_name_exists (XfconfChannel *channel, const gchar *new_p
while (current)
{
gchar **current_elements = g_strsplit (current->data, "/", -1);
gchar *old_profile_name;
if (get_size (current_elements) != 2)
{
......@@ -61,8 +62,13 @@ display_settings_profile_name_exists (XfconfChannel *channel, const gchar *new_p
continue;
}
if (g_strcmp0 (new_profile_name, xfconf_channel_get_string (channel, current->data, NULL)) == 0)
old_profile_name = xfconf_channel_get_string (channel, current->data, NULL);
if (g_strcmp0 (new_profile_name, old_profile_name) == 0)
{
g_free (old_profile_name);
return FALSE;
}
g_free (old_profile_name);
current = g_list_next (current);
}
......
......@@ -1470,6 +1470,7 @@ display_settings_minimal_profile_populate (GtkBuilder *builder)
current = g_list_next (current);
g_free (property);
g_free (profile_name);
}
gtk_widget_show_all (GTK_WIDGET (profile_box));
......@@ -2100,6 +2101,7 @@ display_settings_primary_status_info_populate (GtkBuilder *builder)
else
gtk_widget_hide (GTK_WIDGET (widget));
property = g_strdup_printf ("/panels/panel-%u/output-name", panels + 1);
g_free (primary_status_panel);
}
if (panels_with_primary > 1)
{
......
......@@ -133,7 +133,7 @@ xfce_decorations_helper_channel_property_changed (XfconfChannel *channel
static void
xfce_decorations_helper_init (XfceDecorationsHelper *helper)
{
const gchar *layout;
gchar *layout;
helper->wm_channel = xfconf_channel_get ("xfwm4");
helper->xsettings_channel = xfconf_channel_get ("xsettings");
......@@ -141,6 +141,7 @@ xfce_decorations_helper_init (XfceDecorationsHelper *helper)
layout = xfconf_channel_get_string (helper->wm_channel,
"/general/button_layout", DEFAULT_LAYOUT);
xfce_decorations_set_decoration_layout (helper, layout);
g_free (layout);
/* monitor WM channel changes */
g_signal_connect (G_OBJECT (helper->wm_channel), "property-changed",
......
......@@ -939,7 +939,6 @@ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
GHashTable *props;
XfcePointerData pointer_data;
#endif
const gchar *mode;
gdk_x11_display_error_trap_push (gdk_display_get_default ());
device_list = XListInputDevices (xdisplay, &ndevices);
......@@ -951,6 +950,8 @@ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
for (n = 0; n < ndevices; n++)
{
gchar *mode;
/* filter the pointer devices */
device_info = &device_list[n];
if (device_info->use != IsXExtensionPointer
......@@ -1004,7 +1005,11 @@ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
mode = xfconf_channel_get_string (helper->channel, prop, NULL);
if (mode != NULL)
{
xfce_pointers_helper_change_mode (device_info, device, xdisplay, mode);
g_free (mode);
mode = NULL;
}
#ifdef DEVICE_PROPERTIES
/* set device properties */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment