X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fconfigfile.c;h=32629e08095cb6849d6d681ca19fc1b918d6e7bb;hb=cf872835b60a3ec683b428832fbc79d6aa2df939;hp=c389ad1676a3d2948dd806da979ac5f1ee9f88c5;hpb=7f4143effc63ffbfa7593280822e4ca2cd7e0c09;p=collectd.git diff --git a/src/configfile.c b/src/configfile.c index c389ad16..32629e08 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -610,8 +610,11 @@ static int cf_include_all (oconfig_item_t *root, int depth) return (-1); /* Now replace the i'th child in `root' with `new'. */ - if (cf_ci_replace_child (root, new, i) < 0) + if (cf_ci_replace_child (root, new, i) < 0) { + sfree (new->values); + sfree (new); return (-1); + } /* ... and go back to the new i'th child. */ --i;