[Xfce4-commits] <xfce4-settings:master> Fix double free when setting workspace names (bug #7174).

Nick Schermer noreply at xfce.org
Thu Jan 27 21:50:01 CET 2011


Updating branch refs/heads/master
         to 6c5b2bdd6fd5d733ba3deb968ea3d9193a1038f8 (commit)
       from 4efa1867a4b5d794b0dc56b7ec794b954f12c75a (commit)

commit 6c5b2bdd6fd5d733ba3deb968ea3d9193a1038f8
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Thu Jan 27 21:48:57 2011 +0100

    Fix double free when setting workspace names (bug #7174).

 xfce4-settings-helper/workspaces.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/xfce4-settings-helper/workspaces.c b/xfce4-settings-helper/workspaces.c
index 1c66e81..42eb9ac 100644
--- a/xfce4-settings-helper/workspaces.c
+++ b/xfce4-settings-helper/workspaces.c
@@ -343,6 +343,10 @@ xfce_workspaces_helper_set_names (XfceWorkspacesHelper *helper)
                 if (name != NULL && *name != '\0')
                 {
                     /* use the existing name */
+                    val = g_new0 (GValue, 1);
+                    g_value_init (val, G_TYPE_STRING);
+                    new_name = g_strdup (name);
+                    g_value_take_string (val, new_name);
                     g_ptr_array_add (names, val);
                     continue;
                 }



More information about the Xfce4-commits mailing list