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 language/stat...


From: John Darrington
Subject: [Pspp-cvs] pspp/src language/stats/ChangeLog language/stat...
Date: Sun, 08 Oct 2006 01:49:16 +0000

CVSROOT:        /sources/pspp
Module name:    pspp
Changes by:     John Darrington <jmd>   06/10/08 01:49:16

Modified files:
        src/language/stats: ChangeLog rank.q 
        src/output     : ChangeLog html.c table.c 

Log message:
        Memory leak patrol.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/ChangeLog?cvsroot=pspp&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/rank.q?cvsroot=pspp&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/ChangeLog?cvsroot=pspp&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/html.c?cvsroot=pspp&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/table.c?cvsroot=pspp&r1=1.11&r2=1.12

Patches:
Index: language/stats/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/ChangeLog,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- language/stats/ChangeLog    7 Oct 2006 03:10:14 -0000       1.28
+++ language/stats/ChangeLog    8 Oct 2006 01:49:15 -0000       1.29
@@ -1,3 +1,8 @@
+Sun Oct  8 09:45:40 WST 2006 John Darrington <address@hidden>
+
+       * rank.q: Plugged a small memory leak which occurred under error
+       conditions.
+       
 Sat Oct  7 11:06:01 WST 2006 John Darrington <address@hidden>
 
        * rank.q: Implemented most of the RANK command.

Index: language/stats/rank.q
===================================================================
RCS file: /sources/pspp/pspp/src/language/stats/rank.q,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- language/stats/rank.q       7 Oct 2006 03:10:14 -0000       1.11
+++ language/stats/rank.q       8 Oct 2006 01:49:15 -0000       1.12
@@ -264,7 +264,8 @@
 
       /* Obtain active file in CF. */
       if (!procedure (NULL, NULL))
-       return false;
+       goto error;
+
       cf = proc_capture_output ();
 
       /* Sort CF into SORTED_CF. */
@@ -285,9 +286,13 @@
       
       proc_set_source (storage_source_create (out));
     }
-  free (criteria.crits);
 
+  free (criteria.crits);
   return result ; 
+
+error:
+  free (criteria.crits);
+  return false ;
 }
 
 /* Hardly a rank function !! */

Index: output/ChangeLog
===================================================================
RCS file: /sources/pspp/pspp/src/output/ChangeLog,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- output/ChangeLog    14 Jul 2006 02:28:29 -0000      1.15
+++ output/ChangeLog    8 Oct 2006 01:49:15 -0000       1.16
@@ -1,3 +1,10 @@
+Sun Oct  8 07:09:34 WST 2006 John Darrington <address@hidden>
+
+       * table.c (tab_destroy): Freed title, since this is not allocated
+       from the pool.
+
+       * html.c (html_open_driver): Freed chart_file_name.
+
 Wed Jul 12 21:03:37 2006  Ben Pfaff  <address@hidden>
 
        * table.c (tab_natural_width): Get rid of warning on empty column,

Index: output/html.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/html.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- output/html.c       8 Jul 2006 03:05:52 -0000       1.13
+++ output/html.c       8 Oct 2006 01:49:15 -0000       1.14
@@ -87,10 +87,12 @@
   fputs (" LINK=\"#1f00ff\" ALINK=\"#ff0000\" VLINK=\"#9900dd\">\n", x->file);
   print_title_tag (x->file, "H1", outp_title);
   print_title_tag (x->file, "H2", outp_subtitle);
+  free (x->chart_file_name); 
 
   return true;
 
  error:
+  free (x->chart_file_name); 
   this->class->close_driver (this);
   return false;
 }

Index: output/table.c
===================================================================
RCS file: /sources/pspp/pspp/src/output/table.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- output/table.c      14 Jul 2006 02:28:29 -0000      1.11
+++ output/table.c      8 Oct 2006 01:49:15 -0000       1.12
@@ -87,6 +87,7 @@
 tab_destroy (struct tab_table *t)
 {
   assert (t != NULL);
+  free (t->title);
   pool_destroy (t->container);
 }
 




reply via email to

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