[Xfce4-commits] [apps/xfdashboard] 01/01: Fix unregistering views and search provider (and possibly a memory leak) at XfdashboardSearchManager and XfdashboardViewManager

noreply at xfce.org noreply at xfce.org
Wed Nov 11 13:55:38 CET 2015


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit 1c001eac4be7acf7a608acafb6e48f993f7cf476
Author: Stephan Haller <nomad at froevel.de>
Date:   Wed Nov 11 13:54:28 2015 +0100

    Fix unregistering views and search provider (and possibly a memory leak) at XfdashboardSearchManager and XfdashboardViewManager
---
 xfdashboard/search-manager.c |    5 +++--
 xfdashboard/view-manager.c   |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/xfdashboard/search-manager.c b/xfdashboard/search-manager.c
index 4a33d20..ee72354 100644
--- a/xfdashboard/search-manager.c
+++ b/xfdashboard/search-manager.c
@@ -332,11 +332,12 @@ gboolean xfdashboard_search_manager_unregister(XfdashboardSearchManager *self, c
 			data->ID,
 			g_type_name(data->gtype));
 
-	priv->registeredProviders=g_list_remove(priv->registeredProviders, iter);
+	priv->registeredProviders=g_list_remove_link(priv->registeredProviders, iter);
 	g_signal_emit(self, XfdashboardSearchManagerSignals[SIGNAL_UNREGISTERED], 0, data->ID);
 
-	/* Free data entry */
+	/* Free data entry and list element at iterator */
 	_xfdashboard_search_manager_entry_free(data);
+	g_list_free(iter);
 
 	/* Search provider was unregistered successfully so return TRUE here */
 	return(TRUE);
diff --git a/xfdashboard/view-manager.c b/xfdashboard/view-manager.c
index 059d2ce..43d71c7 100644
--- a/xfdashboard/view-manager.c
+++ b/xfdashboard/view-manager.c
@@ -327,11 +327,12 @@ gboolean xfdashboard_view_manager_unregister(XfdashboardViewManager *self, const
 			data->ID,
 			g_type_name(data->gtype));
 
-	priv->registeredViews=g_list_remove(priv->registeredViews, iter);
+	priv->registeredViews=g_list_remove_link(priv->registeredViews, iter);
 	g_signal_emit(self, XfdashboardViewManagerSignals[SIGNAL_UNREGISTERED], 0, data->ID);
 
-	/* Free data entry */
+	/* Free data entry and list element at iterator */
 	_xfdashboard_view_manager_entry_free(data);
+	g_list_free(iter);
 
 	/* View was unregistered successfully so return TRUE here */
 	return(TRUE);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list