From 56c4a73a23616ff937e0b884303a7216e9b4187d Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 15 Jan 2011 12:53:43 +0000 Subject: [PATCH] make sure we do not free stuff in rrdnew which was simply copied from rrdold and thus gets freed there already ... git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2169 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_resize.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/program/src/rrd_resize.c b/program/src/rrd_resize.c index 748d4c22..f68051c0 100644 --- a/program/src/rrd_resize.c +++ b/program/src/rrd_resize.c @@ -161,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); @@ -282,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); } -- 2.30.2