pspp-cvs
[Top][All Lists]
Advanced

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

[Pspp-cvs] pspp/src/ui/gui ChangeLog var-sheet.c


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src/ui/gui ChangeLog var-sheet.c
Date: Tue, 11 Sep 2007 03:12:35 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Ben Pfaff <blp> 07/09/11 03:12:34

Modified files:
        src/ui/gui     : ChangeLog var-sheet.c 

Log message:
        (psppire_variable_sheet_create): Use xstrdup to save string returned
        by bind_textdomain_codeset.  Otherwise it can get freed by a
        subsequent call.  Patch #6193.  Reviewed by John Darrington.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/ChangeLog?cvsroot=pspp&r1=1.84&r2=1.85
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/var-sheet.c?cvsroot=pspp&r1=1.24&r2=1.25

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/ui/gui/ChangeLog,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -b -r1.84 -r1.85
--- ChangeLog   6 Sep 2007 07:43:02 -0000       1.84
+++ ChangeLog   11 Sep 2007 03:12:34 -0000      1.85
@@ -1,3 +1,10 @@
+2007-09-10  Ben Pfaff  <address@hidden>
+
+       * var-sheet.c (psppire_variable_sheet_create): Use xstrdup to save
+       string returned by bind_textdomain_codeset.  Otherwise it can get
+       freed by a subsequent call.  Patch #6193.  Reviewed by John
+       Darrington.
+
 2007-09-06  John Darrington <address@hidden>
        
        * helper.c helper.h (execute_syntax): changed return type to 

Index: var-sheet.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/ui/gui/var-sheet.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- var-sheet.c 25 Jul 2007 01:33:02 -0000      1.24
+++ var-sheet.c 11 Sep 2007 03:12:34 -0000      1.25
@@ -38,6 +38,7 @@
 #include <gtksheet/gsheet-uniform-row.h>
 
 #include "localcharset.h"
+#include "xalloc.h"
 #include "psppire-var-store.h"
 #include "helper.h"
 #include "psppire-dict.h"
@@ -455,7 +456,7 @@
 
   /* Since this happens inside glade_xml_new, we must prevent strings from
    * being re-encoded twice */
-  codeset = bind_textdomain_codeset (PACKAGE, 0);
+  codeset = xstrdup (bind_textdomain_codeset (PACKAGE, 0));
   bind_textdomain_codeset (PACKAGE, locale_charset ());
 
   for (i = 0 ; i < n_COLS ; ++i )
@@ -468,6 +469,7 @@
     }
 
   bind_textdomain_codeset (PACKAGE, codeset);
+  free (codeset);
 
   gtk_widget_show (sheet);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]