From 69c115e334513b8230d702abc9de021a4c45b272 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Fri, 27 Jul 2012 21:59:54 +0200 Subject: [PATCH] dict_clone: Fix memory leak. The encoding is already set in dict_create, so this assignment is redunant and leaks memory. Reviewed-by: Ben Pfaff. --- src/data/dictionary.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/data/dictionary.c b/src/data/dictionary.c index b9efb2b1f7..f65c6a063e 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -194,10 +194,6 @@ dict_clone (const struct dictionary *s) d = dict_create (s->encoding); - /* Set the new dictionary's encoding early so that string length limitations - are interpreted correctly. */ - d->encoding = xstrdup (s->encoding); - for (i = 0; i < s->var_cnt; i++) { struct variable *sv = s->var[i].var; -- 2.30.2