X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_restore.c;h=c907ee438f6247fca842205a2bdb2c122b27f468;hb=70f35e3bbca2e4172289295f01aaea6735a42b15;hp=31df89f821286e9cb87fa92f62098c0806e64b53;hpb=fff2d8655192db3a32c5f9623832ed3ed1e1f912;p=rrdtool.git diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 31df89f..c907ee4 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.11 Copyright by Tobi Oetiker, 1997-2005 ***************************************************************************** * rrd_restore.c creates new rrd from data dumped by rrd_dump.c *****************************************************************************/ @@ -132,13 +132,11 @@ int xml2rrd(char* buf, rrd_t* rrd, char rc){ { rrd_set_error("Incompatible file version, detected version %s is bigger than supported version %s\n", rrd -> stat_head -> version, RRD_VERSION ); - free(rrd -> stat_head); return -1; } if (atoi(rrd -> stat_head -> version) < 2) { rrd_set_error("Can only restore version >= 2 (Not %s). Dump your old rrd using a current rrdtool dump.", rrd -> stat_head -> version ); - free(rrd -> stat_head); return -1; } rrd->stat_head->float_cookie = FLOAT_COOKIE; @@ -506,7 +504,7 @@ rrd_restore(int argc, char **argv) int opt; - opt = getopt_long(argc, argv, "r:f", long_options, &option_index); + opt = getopt_long(argc, argv, "rf", long_options, &option_index); if (opt == EOF) break;