X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Fevaluate.c;h=91b9c84249b76c0e7d799ad7dc089f66874c314a;hb=cc57a28ef6796ae9a64ef80d453f72126956d49d;hp=fc5b74a3ab57b7727e96226c785640e5a3e8ee43;hpb=9bf1c33953f7feff2a24a06293f6fe96b75cc41a;p=pspp-builds.git diff --git a/src/language/expressions/evaluate.c b/src/language/expressions/evaluate.c index fc5b74a3..91b9c842 100644 --- a/src/language/expressions/evaluate.c +++ b/src/language/expressions/evaluate.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -170,12 +170,9 @@ cmd_debug_evaluate (struct lexer *lexer, struct dataset *dsother UNUSED) } if (c == NULL) - { - c = xmalloc (sizeof *c); - case_create (c, dict_get_next_value_idx (d)); - } + c = case_create (dict_get_next_value_idx (d)); else - case_resize (c, dict_get_next_value_idx (d)); + c = case_resize (c, dict_get_next_value_idx (d)); if (lex_is_number (lexer)) case_data_rw (c, v)->f = lex_tokval (lexer); @@ -255,11 +252,7 @@ cmd_debug_evaluate (struct lexer *lexer, struct dataset *dsother UNUSED) if (ds) destroy_dataset (ds); - if (c != NULL) - { - case_destroy (c); - free (c); - } + case_unref (c); return retval; }