X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fcategoricals.c;h=a3078d36384208024f92379c41e5b6a3dd85344f;hb=96c27d81b9e1161537ce3591c25cb38ae9b6698e;hp=58015c9088c891653329765a9cfc215f67b6b9e8;hpb=207ea79ecdd7500ec0ecaf3d7a79488ba78ca560;p=pspp-builds.git diff --git a/src/math/categoricals.c b/src/math/categoricals.c index 58015c90..a3078d36 100644 --- 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) - 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);