Fix memory leaks parsing string expressions
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 5 Jan 2012 14:39:23 +0000 (15:39 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 5 Jan 2012 14:39:23 +0000 (15:39 +0100)
src/language/expressions/parse.c

index 1bdec1884774be6ef597ae7a3762048264d67368..3124c100a19e4c8922916fcda501ec2c0db058b1 100644 (file)
@@ -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);