MEANS: Fix memory leak
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 20 Jun 2019 18:38:37 +0000 (20:38 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 20 Jun 2019 18:38:37 +0000 (20:38 +0200)
src/language/stats/means.c

index f0174c4ea39038a8658211160fac2107b1b8dfe8..37fa8873aeba7b81804ce5d682205bbccfa404e8 100644 (file)
@@ -118,6 +118,8 @@ destroy_workspace (const struct mtable *mt, struct workspace *ws)
       HMAP_FOR_EACH_SAFE (inst, next, struct instance, hmap_node,
                     &instances->map)
        {
+         int width = var_get_width (inst->var);
+         value_destroy (&inst->value, width);
          free (inst);
        }
       hmap_destroy (&instances->map);