X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_graph.c;h=2fc65263a5d3e93564b64abfb171da7650bbef36;hb=19d16fe9b64af928019545e2ce77cc98211f873a;hp=18be57376507aada5ab24a74e34d1d3a8748a120;hpb=a834877016ceaec229616e4a529d811fb5e028ac;p=rrdtool.git diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 18be573..2fc6526 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1285,6 +1285,7 @@ print_calc(image_desc_t *im, char ***prdata) if (im->gdes[i].gf == GF_PRINT){ (*prdata)[prlines-2] = malloc((FMT_LEG_LEN+2)*sizeof(char)); + (*prdata)[prlines-1] = NULL; if (bad_format(im->gdes[i].format)) { rrd_set_error("bad format for [G]PRINT in '%s'", im->gdes[i].format); return -1; @@ -1294,7 +1295,6 @@ print_calc(image_desc_t *im, char ***prdata) #else sprintf((*prdata)[prlines-2],im->gdes[i].format,printval,si_symb); #endif - (*prdata)[prlines-1] = NULL; } else { /* GF_GPRINT */