From: John Darrington Date: Fri, 27 Jul 2012 19:59:54 +0000 (+0200) Subject: dict_clone: Fix memory leak. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69c115e334513b8230d702abc9de021a4c45b272;p=pspp 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. --- 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;