[gedit] Action name string should be freed in all cases.



commit 9d74140f2d08c2bd2a0deace3739632592cab671
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Nov 26 16:49:20 2011 +0100

    Action name string should be freed in all cases.

 gedit/gedit-window.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 087708e..2066d9f 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -3037,6 +3037,7 @@ sync_name (GeditTab    *tab,
 	}
 	action = gtk_action_group_get_action (window->priv->documents_list_action_group,
 					      action_name);
+	g_free (action_name);
 
 	/* action may be NULL if the idle has not populated the menu yet */
 	if (action != NULL)
@@ -3052,7 +3053,6 @@ sync_name (GeditTab    *tab,
 		g_object_set (action, "label", escaped_name, NULL);
 		g_object_set (action, "tooltip", tip, NULL);
 
-		g_free (action_name);
 		g_free (tab_name);
 		g_free (escaped_name);
 		g_free (tip);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]