X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Fconfigfile.c;h=ae9ab3a6cfe6bd6679fbc3dadc5ffa5a124fc25f;hb=06efe4f50bbdfbade922b8a3ee4576eb2cc4562c;hp=f367ee9c3973d19ddc0acba2e1adc46a2cdeadf6;hpb=1b15b227585497f72ab0e42d96d79c0313323bd4;p=collectd.git diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index f367ee9c..ae9ab3a6 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -628,8 +628,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;