GET DATA: Fix memory leak 20120716000503/pspp
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 15 Jul 2012 12:59:30 +0000 (14:59 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 15 Jul 2012 12:59:30 +0000 (14:59 +0200)
src/language/data-io/get-data.c

index 10d59aa374aa06cd29b30c3ea3e58bf528187099..789300015e8243ce2170224ecb8c3762d64bf835 100644 (file)
@@ -65,10 +65,12 @@ cmd_get_data (struct lexer *lexer, struct dataset *ds)
   tok = strdup (lex_tokcstr (lexer));
   if (lex_match_id (lexer, "TXT"))
     {
+      free (tok);
       return parse_get_txt (lexer, ds);
     }
   else if (lex_match_id (lexer, "PSQL"))
     {
+      free (tok);
       return parse_get_psql (lexer, ds);
     }
   else if (lex_match_id (lexer, "GNM") ||