X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fnp-plot.c;h=dfc74603003f342dacc7141ee347d472aa8a127b;hb=66946a0a0cab3a51e6fded95aef4e991baee319f;hp=e912479a72bbd0bceca65079a1bfc3c098522c80;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp diff --git a/src/output/charts/np-plot.c b/src/output/charts/np-plot.c index e912479a72..dfc7460300 100644 --- a/src/output/charts/np-plot.c +++ b/src/output/charts/np-plot.c @@ -36,7 +36,7 @@ make_np_plot (const struct np *np, const struct casereader *reader, if (np->n < 1.0) return NULL; - npp = xmalloc (sizeof *npp); + npp = xzalloc (sizeof *npp); chart_item_init (&npp->chart_item, &np_plot_chart_class, label); npp->data = casereader_clone (reader); npp->y_min = np->y_min; @@ -97,7 +97,6 @@ np_plot_chart_destroy (struct chart_item *chart_item) { struct np_plot_chart *npp = to_np_plot_chart (chart_item); casereader_destroy (npp->data); - free (npp->label); free (npp); }