pspp-dump-sav: Fix memory leaks.
[pspp] / src / language / dictionary / variable-display.c
index 63bc6d472c6f4c8b01ac221b339ab6e5d518a3e9..657e317a4c56e89afe52b0788ffa0caf4650de00 100644 (file)
@@ -65,7 +65,8 @@ cmd_variable_alignment (struct lexer *lexer, struct dataset *ds)
               return CMD_FAILURE;
             }
 
-         lex_force_match (lexer, T_RPAREN);
+         if (!lex_force_match (lexer, T_RPAREN))
+           return CMD_FAILURE;
        }
       else
         {
@@ -163,7 +164,8 @@ cmd_variable_level (struct lexer *lexer, struct dataset *ds)
               return CMD_FAILURE;
             }
 
-         lex_force_match (lexer, T_RPAREN);
+         if (!lex_force_match (lexer, T_RPAREN))
+           return CMD_FAILURE;
        }
       else
         {
@@ -198,7 +200,7 @@ cmd_variable_role (struct lexer *lexer, struct dataset *ds)
       if ( lex_match_id (lexer, "INPUT"))
         role = ROLE_INPUT;
       else if ( lex_match_id (lexer, "TARGET"))
-        role = ROLE_OUTPUT;
+        role = ROLE_TARGET;
       else if ( lex_match_id (lexer, "BOTH"))
         role = ROLE_BOTH;
       else if ( lex_match_id (lexer, "NONE"))