From: oetiker Date: Wed, 11 Jul 2007 23:08:47 +0000 (+0000) Subject: usr rrd_free for freeing the rrd structs ... vito caputo X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8238f5f6f0b38b8237a6edd081772b03d9f448cb;p=rrdtool.git usr rrd_free for freeing the rrd structs ... vito caputo git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1146 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_create.c b/src/rrd_create.c index 4c9943e..a5c304f 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -632,12 +632,7 @@ int rrd_create_fn( if ((rrd_file = fopen(file_name, "wb")) == NULL) { rrd_set_error("creating '%s': %s", file_name, rrd_strerror(errno)); - free(rrd->stat_head); - rrd->stat_head = NULL; - free(rrd->ds_def); - rrd->ds_def = NULL; - free(rrd->rra_def); - rrd->rra_def = NULL; + rrd_free(rrd); return (-1); }