[Xfce4-commits] [apps/xfdashboard] 19/31: Free icon name after setting button icon at XfdashboardApplicationButton

noreply at xfce.org noreply at xfce.org
Thu Jun 11 19:57:14 CEST 2015


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

nomad pushed a commit to annotated tag 0.4.1
in repository apps/xfdashboard.

commit 67f6331f37a57b60f53fe2b43db96eed766124f2
Author: Stephan Haller <nomad at froevel.de>
Date:   Sat May 16 19:32:32 2015 +0200

    Free icon name after setting button icon at XfdashboardApplicationButton
---
 xfdashboard/application-button.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/xfdashboard/application-button.c b/xfdashboard/application-button.c
index c675601..97d0b67 100644
--- a/xfdashboard/application-button.c
+++ b/xfdashboard/application-button.c
@@ -120,7 +120,7 @@ static void _xfdashboard_application_button_update_text(XfdashboardApplicationBu
 static void _xfdashboard_application_button_update_icon(XfdashboardApplicationButton *self)
 {
 	XfdashboardApplicationButtonPrivate		*priv;
-	const gchar								*iconName;
+	gchar									*iconName;
 
 	g_return_if_fail(XFDASHBOARD_IS_APPLICATION_BUTTON(self));
 
@@ -140,10 +140,13 @@ static void _xfdashboard_application_button_update_icon(XfdashboardApplicationBu
 		}
 	}
 
-	if(!iconName) iconName="gtk-missing-image";
+	if(!iconName) iconName=g_strdup("gtk-missing-image");
 
 	/* Set up button and release allocated resources */
 	if(iconName) xfdashboard_button_set_icon(XFDASHBOARD_BUTTON(self), iconName);
+
+	/* Release allocated resources */
+	if(iconName) g_free(iconName);
 }
 
 /* The app info has changed */

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


More information about the Xfce4-commits mailing list