X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fchart.c;h=e324901cc4df1d445f3fc8c7a4b64296bca55bca;hb=ebbfbe937906e4b4ca577478965cf06d1a812715;hp=489ef189f6d3817c047147ef8bcd206ec31cc56c;hpb=02118dddfe989ca4fda5db5b54d64b1a564b6674;p=pspp-builds.git diff --git a/src/output/chart.c b/src/output/chart.c index 489ef189..e324901c 100644 --- a/src/output/chart.c +++ b/src/output/chart.c @@ -29,12 +29,12 @@ #include -#include #include #include #include #include "error.h" +#include "xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -83,6 +83,9 @@ chart_create(void) chart->legend_left = 810; chart->legend_right = 1000; chart->font_size = 0; + chart->in_path = false; + chart->dataset = NULL; + chart->n_datasets = 0; strcpy(chart->fill_colour,"red"); /* Get default font size */ @@ -100,6 +103,7 @@ chart_create(void) void chart_submit(struct chart *chart) { + int i; struct som_entity s; struct outp_driver *d; @@ -124,6 +128,11 @@ chart_submit(struct chart *chart) d = outp_drivers (NULL); d->class->finalise_chart(d, chart); + + for (i = 0 ; i < chart->n_datasets; ++i) + free (chart->dataset[i]); + free (chart->dataset); + free(chart); }