From: Ben Pfaff Date: Fri, 27 Jul 2007 21:44:18 +0000 (+0000) Subject: (run_regression): Move casereader_destroy call so that it always gets X-Git-Tag: v0.6.0~344 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56728c4e740a15c66266f54bed1307299f723f56;p=pspp-builds.git (run_regression): Move casereader_destroy call so that it always gets called, not just if there was some valid data. Fixes bug #19581. Reviewed by Jason Stover. --- diff --git a/src/language/stats/ChangeLog b/src/language/stats/ChangeLog index 78a256af..574b958d 100644 --- a/src/language/stats/ChangeLog +++ b/src/language/stats/ChangeLog @@ -1,3 +1,10 @@ +2007-07-27 Ben Pfaff + + * regression.q (run_regression): Move casereader_destroy call so + that it always gets called, not just if there was some valid + data. Fixes bug #19581. + Reviewed by Jason Stover. + 2007-07-24 Ben Pfaff * flip.c (struct flip_pgm): Remove `case_size' member (now diff --git a/src/language/stats/regression.q b/src/language/stats/regression.q index 869f32a7..2c1c9aa8 100644 --- a/src/language/stats/regression.q +++ b/src/language/stats/regression.q @@ -1211,7 +1211,6 @@ run_regression (struct casereader *input, struct cmd_regression *cmd, } gsl_vector_set (Y, row, case_num (&c, dep_var)); } - casereader_destroy (reader); /* Now that we know the number of coefficients, allocate space and store pointers to the variables that correspond to the @@ -1238,6 +1237,7 @@ run_regression (struct casereader *input, struct cmd_regression *cmd, { msg (SE, gettext ("No valid data found. This command was skipped.")); } + casereader_destroy (reader); } free (indep_vars); free (lopts.get_indep_mean_std);