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

Simon Steinbeiss noreply at xfce.org
Thu Oct 25 11:14:01 CEST 2012


Updating branch refs/heads/bluesabre/display-settings
         to a4dbaf9416a626e058683f631fc037e282f24fa7 (commit)
       from 60916962015a2c3e54029cc92597b98c8fbdd3c9 (commit)

commit a4dbaf9416a626e058683f631fc037e282f24fa7
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