projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c849d5d
)
dict_clone: Fix memory leak.
20120728000505/pspp
author
John Darrington
<john@darrington.wattle.id.au>
Fri, 27 Jul 2012 19:59:54 +0000
(21:59 +0200)
committer
John Darrington
<john@darrington.wattle.id.au>
Fri, 27 Jul 2012 19:59:54 +0000
(21:59 +0200)
The encoding is already set in dict_create, so this assignment is
redunant and leaks memory.
Reviewed-by: Ben Pfaff.
src/data/dictionary.c
patch
|
blob
|
history
diff --git
a/src/data/dictionary.c
b/src/data/dictionary.c
index b9efb2b1f74cde7e72f58aa41cce7a0503dfa488..f65c6a063e1ab99cf918da6df19d3bdb6ea0145e 100644
(file)
--- 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;