[Xfce4-commits] <xfce4-settings:master> Fix memleak in the confirmation dialog

Nick Schermer noreply at xfce.org
Sun Oct 28 10:45:27 CET 2012


Updating branch refs/heads/master
         to 2810861ee25677d8612931b48f6f6dc749bade1c (commit)
       from e746c3379c7955772f58445beb2796f9095f5063 (commit)

commit 2810861ee25677d8612931b48f6f6dc749bade1c
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Wed Oct 24 18:39:18 2012 +0200

    Fix memleak in the confirmation dialog
    
    (and don't use a cpp reserved keyword)
    
    Signed-off-by: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>

 dialogs/display-settings/main.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 5f7fe63..ac2d09e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -243,14 +243,15 @@ display_settings_update_time_label (ConfirmationDialog *confirmation_dialog)
     else
     {
         GObject *label;
-        gchar   *string;
+        gchar   *label_string;
 
-        string = g_strdup_printf (_("The previous configuration will be restored in %i"
-                                    " seconds if you do not reply to this question."),
-                                  confirmation_dialog->count);
+        label_string = g_strdup_printf (_("The previous configuration will be restored in %i"
+                                          " seconds if you do not reply to this question."),
+                                        confirmation_dialog->count);
 
         label = gtk_builder_get_object (confirmation_dialog->builder, "label2");
-        gtk_label_set_text (GTK_LABEL (label), string);
+        gtk_label_set_text (GTK_LABEL (label), label_string);
+        g_free (label_string);
 
         return TRUE;
     }


More information about the Xfce4-commits mailing list