X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_cgi.c;h=4731d9709c8093971e7264c1ef88aab12568e462;hb=62cc2872aa936cbf4683da1a4f01c8fb29ed6a27;hp=85b0aee5faf290d7feebda9d976735d11968ef90;hpb=c24cf5317f753d0bfb376835b4f907462a770384;p=rrdtool.git diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 85b0aee..4731d97 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc9 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.4.1 Copyright by Tobi Oetiker, 1997-2009 ***************************************************************************** * rrd_cgi.c RRD Web Page Generator *****************************************************************************/ @@ -374,6 +374,7 @@ static void calfree( if (calcpr) { free(calcpr); } + calcpr = NULL; } } @@ -953,7 +954,6 @@ char *drawgraph( DS_NAM_SIZE) * sizeof(char)); sprintf(err, "[ERROR: %s]", rrd_get_error()); rrd_clear_error(); - calfree(); return err; } } @@ -1387,7 +1387,8 @@ s_var **rrdcgiReadVariables( length = atoi(ip); if ((line = (char *) malloc(length + 2)) == NULL) return NULL; - fgets(line, length + 1, stdin); + if (fgets(line, length + 1, stdin) == NULL) + return NULL; } else return NULL; } else if (cp && !strcmp(cp, "GET")) {