X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_resize.c;h=81410251d0071583db8a5f24cd12c24fa68a42de;hb=fa7d240d60a1179513ae9021bf948247d00592e4;hp=e441fe7029a31884e02e3cc1579f3861a9efde2b;hpb=2a9b0ff9cf29cf82b7b12ea80889c59273d66008;p=rrdtool.git diff --git a/src/rrd_resize.c b/src/rrd_resize.c index e441fe7..8141025 100644 --- a/src/rrd_resize.c +++ b/src/rrd_resize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.4.2 Copyright by Tobi Oetiker, 1997-2009 + * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 ***************************************************************************** * rrd_resize.c Alters size of an RRA ***************************************************************************** @@ -118,7 +118,6 @@ int rrd_resize( rrd_free(&rrdnew); rrd_free(&rrdold); rrd_close(rrd_file); - rrd_close(rrd_out_file); return (-1); } if (rrd_lock(rrd_out_file) != 0) { @@ -162,6 +161,12 @@ int rrd_resize( default: rrd_set_error("Do not know how to handle RRD version %s", rrdold.stat_head->version); + + rrdnew.ds_def = NULL; + rrdnew.live_head = NULL; + rrdnew.pdp_prep = NULL; + rrdnew.cdp_prep = NULL; + rrd_free(&rrdnew); rrd_free(&rrdold); rrd_close(rrd_file); @@ -283,6 +288,12 @@ int rrd_resize( rrd_close(rrd_file); rrd_close(rrd_out_file); rrd_free(&rrdold); + + rrdnew.ds_def = NULL; + rrdnew.live_head = NULL; + rrdnew.pdp_prep = NULL; + rrdnew.cdp_prep = NULL; + rrd_free(&rrdnew); return (0); }