From e4a9704334c09059ac2e2a8262b2089a2cfa493c Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 15 Jul 2012 14:59:30 +0200 Subject: [PATCH] GET DATA: Fix memory leak --- src/language/data-io/get-data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/language/data-io/get-data.c b/src/language/data-io/get-data.c index 10d59aa374..789300015e 100644 --- a/src/language/data-io/get-data.c +++ b/src/language/data-io/get-data.c @@ -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") || -- 2.30.2