From: John Darrington Date: Sun, 21 Sep 2008 02:42:15 +0000 (+0800) Subject: Avoid crash when recovering from syntax error in RELIABILITY. X-Git-Tag: v0.7.1~50^2~52 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=290077732ca206c99fe3d83697b38ff53af83361;p=pspp-builds.git Avoid crash when recovering from syntax error in RELIABILITY. --- diff --git a/src/language/stats/reliability.q b/src/language/stats/reliability.q index 0222a3f3..8384bb35 100644 --- a/src/language/stats/reliability.q +++ b/src/language/stats/reliability.q @@ -262,8 +262,11 @@ cmd_reliability (struct lexer *lexer, struct dataset *ds) free (c->items); moments1_destroy (c->total); - for (x = 0 ; x < c->n_items; ++x) - moments1_destroy (c->m[x]); + + if ( c->m) + for (x = 0 ; x < c->n_items; ++x) + moments1_destroy (c->m[x]); + free (c->m); }