[Xfce4-commits] <xfce4-settings:xfce-4.8> Don't use freed memory (bug #7653).

Nick Schermer noreply at xfce.org
Tue May 24 17:18:01 CEST 2011


Updating branch refs/heads/xfce-4.8
         to 72f1d690f26e6a0db44c40a0bf6202367294e218 (commit)
       from e15dea9cf244298ad11ad834dbafdb3e8e9578da (commit)

commit 72f1d690f26e6a0db44c40a0bf6202367294e218
Author: Nick Schermer <nick at xfce.org>
Date:   Tue May 24 17:13:38 2011 +0200

    Don't use freed memory (bug #7653).
    
    (cherry picked from commit 8d40a86ce47bff03704558061c5fbf0c65290e61)

 dialogs/appearance-settings/main.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dialogs/appearance-settings/main.c b/dialogs/appearance-settings/main.c
index 4ec41c4..d599ec5 100644
--- a/dialogs/appearance-settings/main.c
+++ b/dialogs/appearance-settings/main.c
@@ -443,9 +443,6 @@ appearance_settings_load_ui_themes (GtkListStore *list_store,
 
                     /* Escape the comment because tooltips are markup, not text */
                     comment_escaped = theme_comment ? g_markup_escape_text (theme_comment, -1) : NULL;
-
-                    /* Close theme index file */
-                    xfce_rc_close (index_file);
                 }
                 else
                 {
@@ -462,6 +459,8 @@ appearance_settings_load_ui_themes (GtkListStore *list_store,
                                     COLUMN_THEME_COMMENT, comment_escaped, -1);
 
                 /* Cleanup */
+                if (G_LIKELY (index_file != NULL))
+                    xfce_rc_close (index_file);
                 g_free (comment_escaped);
 
                 /* Check if this is the active theme, if so, select it */



More information about the Xfce4-commits mailing list