diff --git a/pyxmeans/c_minibatch/minibatch.c b/pyxmeans/c_minibatch/minibatch.c index c2462a2..f034ec8 100644 --- a/pyxmeans/c_minibatch/minibatch.c +++ b/pyxmeans/c_minibatch/minibatch.c @@ -333,6 +333,7 @@ void minibatch(double *data, double *centroids, int n_samples, int max_iter, dou free(centroid_counts); free(sample_indicies); free(cluster_cache); + free(last_centroid_counts); if (bic_ratio_termination > 0.0) { free(historical_bic);