+2007-09-19 Ben Pfaff <blp@gnu.org>
+
+ Fix bug #21108.
+
+ * aggregate.c (cmd_aggregate): Destroy casereader consistently,
+ even if casereader fails.
+
+ * examine.q (run_examine): Ditto.
+
+ * glm.q (run_glm): Ditto.
+
+ * oneway.q (run_oneway): Ditto.
+
+ * regression.q (run_regression): Ditto.
+
+ * t-test.q (calculate): Ditto.
+
+ * descriptives.c (calc_descriptives): Ditto. Also avoid
+ gratuitous casereader_clone.
+
2007-09-13 Jason Stover <jhs@debs.hoobahooba.net>
* regression.q (cmd_regression): Move declaration of models in to
struct ccase c;
if (!casereader_peek (group, 0, &c))
- continue;
+ {
+ casereader_destroy (group);
+ continue;
+ }
initialize_aggregate_info (&agr, &c);
case_destroy (&c);
size_t i;
if (!casereader_peek (group, 0, &c))
- return;
+ {
+ casereader_destroy (group);
+ return;
+ }
output_split_file_values (ds, &c);
case_destroy (&c);
group = casereader_create_filter_weight (group, dataset_dict (ds),
NULL, NULL);
- casereader_split (group, &pass1, &pass2);
- if (dsc->max_moment <= MOMENT_MEAN)
- casereader_destroy (pass2);
+ pass1 = group;
+ pass2 = dsc->max_moment <= MOMENT_MEAN ? NULL : casereader_clone (pass1);
for (i = 0; i < dsc->var_cnt; i++)
{
}
}
if (!casereader_destroy (pass1))
- return;
+ {
+ casereader_destroy (pass2);
+ return;
+ }
/* Second pass for higher-order moments. */
if (dsc->max_moment > MOMENT_MEAN)
struct factor *fctr;
if (!casereader_peek (input, 0, &c))
- return;
+ {
+ casereader_destroy (input);
+ return;
+ }
output_split_file_values (ds, &c);
case_destroy (&c);
assert (model != NULL);
if (!casereader_peek (input, 0, &c))
- return true;
+ {
+ casereader_destroy (input);
+ return true;
+ }
output_split_file_values (ds, &c);
case_destroy (&c);
struct ccase c;
if (!casereader_peek (input, 0, &c))
- return;
+ {
+ casereader_destroy (input);
+ return;
+ }
output_split_file_values (ds, &c);
case_destroy (&c);
assert (models != NULL);
if (!casereader_peek (input, 0, &c))
- return true;
+ {
+ casereader_destroy (input);
+ return true;
+ }
output_split_file_values (ds, &c);
case_destroy (&c);
enum mv_class exclude = cmd->miss != TTS_INCLUDE ? MV_ANY : MV_SYSTEM;
if (!casereader_peek (input, 0, &c))
- return;
+ {
+ casereader_destroy (input);
+ return;
+ }
output_split_file_values (ds, &c);
case_destroy (&c);