X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Fconfigfile.c;h=ae3e79899d2eddf1304bcc00ba178289b3602d02;hb=d8a02e6c6f5875dfcab7b011d1f340e3a13c9e39;hp=8fc6f7d730222a5b8c34585ef701737ad056b4d1;hpb=24c2f247f6dc5c17b26d715346a380efababb08f;p=collectd.git diff --git a/src/daemon/configfile.c b/src/daemon/configfile.c index 8fc6f7d7..ae3e7989 100644 --- a/src/daemon/configfile.c +++ b/src/daemon/configfile.c @@ -623,8 +623,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;