X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Ftrimmed-mean.c;fp=src%2Fmath%2Ftrimmed-mean.c;h=4840fd2d66e0375a6114e3585fc5795b9acf60d7;hb=922dfe227e0a157f895c025b8f8590e2bfc59f23;hp=b643651a26aa4240e0340768b32af1c3ed37a320;hpb=947e6378c28a6a33a2cd9ef4c4d90e001bdcc359;p=pspp diff --git a/src/math/trimmed-mean.c b/src/math/trimmed-mean.c index b643651a26..4840fd2d66 100644 --- a/src/math/trimmed-mean.c +++ b/src/math/trimmed-mean.c @@ -44,8 +44,6 @@ static void destroy (struct statistic *s) { struct trimmed_mean *tm = UP_CAST (s, struct trimmed_mean, parent.parent); - struct order_stats *os = &tm->parent; - free (os->k); free (tm); } @@ -57,7 +55,7 @@ trimmed_mean_create (double W, double tail) struct statistic *stat = &os->parent; os->n_k = 2; - os->k = xcalloc (2, sizeof (*os->k)); + os->k = tm->k; assert (tail >= 0); assert (tail <= 1);