X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_xport.c;h=c12b783bd07dce361f5b7f9045149a44db8052a0;hb=36fd683318a492d56a990e470b28a8119066ecff;hp=488c24c3edbd057e005e2bf8c640544da6d9a549;hpb=08fb8353d857335537fba9058f9b87cdc948c2a8;p=rrdtool.git diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 488c24c..c12b783 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -376,8 +376,10 @@ rrd_xport_fn(image_desc_t *im, if ((legend_list[j] = malloc(sizeof(char) * (FMT_LEG_LEN+5)))==NULL) { free(srcptr_list); free(ref_list); + free(*data); *data = NULL; + while (--j > -1) free(legend_list[j]); free(legend_list); - rrd_set_error("malloc xprint legend entry"); + rrd_set_error("malloc xport legend entry"); return(-1); }