X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fpercentiles.c;fp=src%2Fmath%2Fpercentiles.c;h=1b4ff136328ecdbe0ba9fb2cd1bff521519d5803;hb=922dfe227e0a157f895c025b8f8590e2bfc59f23;hp=b43fed461612d7a6f0e63ab8ddbc0fad7f549422;hpb=947e6378c28a6a33a2cd9ef4c4d90e001bdcc359;p=pspp diff --git a/src/math/percentiles.c b/src/math/percentiles.c index b43fed4616..1b4ff13632 100644 --- a/src/math/percentiles.c +++ b/src/math/percentiles.c @@ -139,8 +139,6 @@ static void destroy (struct statistic *stat) { struct percentile *ptl = UP_CAST (stat, struct percentile, parent.parent); - struct order_stats *os = &ptl->parent; - free (os->k); free (ptl); } @@ -159,7 +157,7 @@ percentile_create (double p, double W) ptl->w = W; os->n_k = 2; - os->k = xcalloc (2, sizeof (*os->k)); + os->k = ptl->k; os->k[0].tc = W * p; os->k[1].tc = (W + 1.0) * p;