file-handle-def.h (fh_ref): Add WARN_UNUSED_RESULT qualifier
[pspp] / src / math / categoricals.c
index 30c4c567ce607bc1baaeaceeab599c86ba2fd1f5..eb28cb42bf50c5601f057c7b7930db63ff2aa9f2 100644 (file)
@@ -276,6 +276,7 @@ categoricals_destroy (struct categoricals *cat)
       free (cat->iap[i].enc_sum);
       hmap_destroy (&cat->iap[i].ivmap);
     }
+  free (cat->iap);
 
   /* Interate over each variable and delete its value map.
 
@@ -382,7 +383,7 @@ categoricals_update (struct categoricals *cat, const struct ccase *c)
         {
           valn = pool_malloc (cat->pool, sizeof *valn);
           valn->index = -1;
-          value_init (&valn->val, width);
+          value_init_pool (cat->pool, &valn->val, width);
           value_copy (&valn->val, val, width);
           hmap_insert (&vn->valmap, &valn->node, hash);
         }