projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GLM: Fix memory leaks
[pspp-builds.git]
/
src
/
math
/
categoricals.c
diff --git
a/src/math/categoricals.c
b/src/math/categoricals.c
index 58015c9088c891653329765a9cfc215f67b6b9e8..a3078d36384208024f92379c41e5b6a3dd85344f 100644
(file)
--- a/
src/math/categoricals.c
+++ b/
src/math/categoricals.c
@@
-125,7
+125,17
@@
categoricals_destroy ( struct categoricals *cat)
if (cat != NULL)
{
for (i = 0 ; i < cat->n_vp; ++i)
if (cat != NULL)
{
for (i = 0 ; i < cat->n_vp; ++i)
- hmap_destroy (&cat->vp[i].map);
+ {
+ struct hmap *map = &cat->vp[i].map;
+ struct value_node *nn;
+
+ HMAP_FOR_EACH (nn, struct value_node, node, map)
+ {
+ case_unref (nn->ccase);
+ }
+
+ hmap_destroy (map);
+ }
pool_destroy (cat->pool);
free (cat);
pool_destroy (cat->pool);
free (cat);