Fix memory leak in AGGREGATE.
authorBen Pfaff <blp@gnu.org>
Mon, 8 May 2006 01:31:49 +0000 (01:31 +0000)
committerBen Pfaff <blp@gnu.org>
Mon, 8 May 2006 01:31:49 +0000 (01:31 +0000)
src/language/stats/ChangeLog
src/language/stats/aggregate.c

index 8794b8751ff60c3884a8c66d8f4a0f1b46bffec5..b7c65e71411595f35b37feb557df8d02b491b082 100644 (file)
@@ -1,3 +1,10 @@
+Sun May  7 18:31:25 2006  Ben Pfaff  <blp@gnu.org>
+
+       Fix memory leak.
+       
+       * aggregate.c (cmd_aggregate): Free default_dict before replacing
+       it.
+
 Sun May  7 17:09:19 2006  Ben Pfaff  <blp@gnu.org>
 
        * flip.c (flip_file): Check return value of pool_fclose().
index cd3011704af03a73ce79179f4ab998a47c09f66f..2497d064b2226cf6bf7a9705e165dd9be29fc45f 100644 (file)
@@ -288,6 +288,7 @@ cmd_aggregate (void)
             goto error;
         }
       discard_variables ();
+      dict_destroy (default_dict);
       default_dict = agr.dict;
       agr.dict = NULL;
       proc_set_source (agr.sink->class->make_source (agr.sink));