pspp-cvs
[Top][All Lists]
Advanced

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

[Pspp-cvs] pspp/src/language/stats ChangeLog crosstabs.q


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src/language/stats ChangeLog crosstabs.q
Date: Thu, 13 Sep 2007 04:23:15 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Ben Pfaff <blp> 07/09/13 04:23:15

Modified files:
        src/language/stats: ChangeLog crosstabs.q 

Log message:
        (postcalc): Free sorted_tab and the structures that it points to, to
        plug a memory leak.  Fixes bug #20910.  Thanks to John Darrington for
        reporting this bug and for review.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/ChangeLog?cvsroot=pspp&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/crosstabs.q?cvsroot=pspp&r1=1.33&r2=1.34

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/ChangeLog,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- ChangeLog   5 Sep 2007 04:49:41 -0000       1.63
+++ ChangeLog   13 Sep 2007 04:23:15 -0000      1.64
@@ -1,3 +1,9 @@
+2007-09-12  Ben Pfaff  <address@hidden>
+
+       * crosstabs.q (postcalc): Free sorted_tab and the structures that
+       it points to, to plug a memory leak.  Fixes bug #20910.  Thanks to
+       John Darrington for reporting this bug and for review.
+
 2007-09-04  Ben Pfaff  <address@hidden>
 
        * crosstabs.q (cmd_crosstabs): Free xtab and the structures that

Index: crosstabs.q
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/crosstabs.q,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- crosstabs.q 5 Sep 2007 04:49:42 -0000       1.33
+++ crosstabs.q 13 Sep 2007 04:23:15 -0000      1.34
@@ -827,6 +827,16 @@
   }
 
   hsh_destroy (gen_tab);
+  if (mode == INTEGER)
+    {
+      int i;
+      for (i = 0; i < n_sorted_tab; i++)
+        {
+          free (sorted_tab[i]->u.data);
+          free (sorted_tab[i]);
+        }
+      free (sorted_tab);
+    }
 }
 
 static void insert_summary (struct tab_table *, int tab_index, double valid);




reply via email to

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