From: John Darrington Date: Wed, 16 Dec 2009 19:52:33 +0000 (+0100) Subject: Fix bug in ROC parsing long string variables X-Git-Tag: sid-i386-build124^0 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5151983c7f0faf00facba5dfaf6d17947337aa42;p=pspp-builds.git Fix bug in ROC parsing long string variables --- diff --git a/src/language/stats/roc.c b/src/language/stats/roc.c index 1d61a55c..86aee1f9 100644 --- a/src/language/stats/roc.c +++ b/src/language/stats/roc.c @@ -112,6 +112,7 @@ cmd_roc (struct lexer *lexer, struct dataset *ds) goto error; } + value_init (&roc.state_value, var_get_width (roc.state_var)); parse_value (lexer, &roc.state_value, var_get_width (roc.state_var)); @@ -271,10 +272,12 @@ cmd_roc (struct lexer *lexer, struct dataset *ds) if ( ! run_roc (ds, &roc)) goto error; + value_destroy (&roc.state_value, var_get_width (roc.state_var)); free (roc.vars); return CMD_SUCCESS; error: + value_destroy (&roc.state_value, var_get_width (roc.state_var)); free (roc.vars); return CMD_FAILURE; }