From: Ben Pfaff Date: Sun, 21 Jul 2019 17:07:15 +0000 (-0700) Subject: categoricals: Fix memory leak allocating long string categoricals. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97062a80d903df3d43d71ed33e6f73fa7a4b6554;p=pspp categoricals: Fix memory leak allocating long string categoricals. --- diff --git a/src/math/categoricals.c b/src/math/categoricals.c index 3f9dc00975..eb28cb42bf 100644 --- a/src/math/categoricals.c +++ b/src/math/categoricals.c @@ -383,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); }