From: John Darrington Date: Thu, 21 Oct 2010 20:01:34 +0000 (+0200) Subject: Fix memory deallocation bug X-Git-Tag: v0.7.7~196 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5024fb6bb69bbe8dbe9b3115f0e934d709e6598c;p=pspp-builds.git Fix memory deallocation bug --- diff --git a/src/language/stats/runs.c b/src/language/stats/runs.c index 450edbf4..d27cbf40 100644 --- a/src/language/stats/runs.c +++ b/src/language/stats/runs.c @@ -186,12 +186,15 @@ runs_execute (const struct dataset *ds, subcase_init_var (&sc, var, SC_ASCEND); writer = sort_create_writer (&sc, casereader_get_proto (reader)); - for (; (c = casereader_read (reader)); case_unref (c)) + for (; (c = casereader_read (reader)); ) { const union value *val = case_data (c, var); const double w = weight ? case_data (c, weight)->f: 1.0; if ( var_is_value_missing (var, val, exclude)) - continue; + { + case_unref (c); + continue; + } cc += w; casewriter_write (writer, c);