Apply UNUSED and include additional headers to avoid complaints from
[pspp] / src / language / lexer / variable-parser.c
index d9eae5247c3dc833a5f105861e6179354567797d..731873dca11b060ab353b10dbeb2f77ae5d64fca 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -107,8 +106,12 @@ parse_variables (struct lexer *lexer, const struct dictionary *d,
 
   vs = var_set_create_from_dict (d);
   success = parse_var_set_vars (lexer, vs, var, cnt, opts);
-  if ( success == 0 )
-     free ( *var ) ;
+  if ( success == 0 ) 
+    {
+      free ( *var ) ;
+      *var = NULL;
+      *cnt = 0;
+    }
   var_set_destroy (vs);
   return success;
 }