From: John Darrington Date: Thu, 5 Jan 2012 14:39:23 +0000 (+0100) Subject: Fix memory leaks parsing string expressions X-Git-Tag: v0.7.9~45 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03db9d67dfb8acaeb47994caa18b62e7aec741af;p=pspp-builds.git Fix memory leaks parsing string expressions --- diff --git a/src/language/expressions/parse.c b/src/language/expressions/parse.c index 1bdec188..3124c100 100644 --- a/src/language/expressions/parse.c +++ b/src/language/expressions/parse.c @@ -897,8 +897,8 @@ parse_primary (struct lexer *lexer, struct expression *e) dict_encoding = (e->ds != NULL ? dict_get_encoding (dataset_dict (e->ds)) : "UTF-8"); - s = recode_string (dict_encoding, "UTF-8", lex_tokcstr (lexer), - ss_length (lex_tokss (lexer))); + s = recode_string_pool (dict_encoding, "UTF-8", lex_tokcstr (lexer), + ss_length (lex_tokss (lexer)), e->expr_pool); node = expr_allocate_string (e, ss_cstr (s)); lex_get (lexer);