From: Jason Stover Date: Sat, 25 Mar 2006 22:46:21 +0000 (+0000) Subject: Fixed memory leak X-Git-Tag: v0.6.0~1032 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a168f698c3e161f7205a2363226f2280769aaa8e;p=pspp-builds.git Fixed memory leak --- diff --git a/src/data/category.c b/src/data/category.c index 55d7ca8b..50908549 100644 --- a/src/data/category.c +++ b/src/data/category.c @@ -59,9 +59,16 @@ void cat_stored_values_destroy (struct variable *v) { assert (v != NULL); + if (v->obs_vals != NULL) { + if (v->obs_vals->n_allocated_categories > 0) + { + free (v->obs_vals->vals); + v->obs_vals->vals = NULL; + } free (v->obs_vals); + v->obs_vals = NULL; } }