summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2012-09-03 19:23:18 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-04 10:20:33 +0200
commit18ff8d54dde1d0c8603d5f06800ce3d55eb86fb2 (patch)
tree0afc325fe90d75f2d83cc54108eb4ba05da885f2
parent64599e94126341f3d19703ea85f6403cbf80a5fb (diff)
downloadrsyslog-18ff8d54dde1d0c8603d5f06800ce3d55eb86fb2.tar.gz
rsyslog-18ff8d54dde1d0c8603d5f06800ce3d55eb86fb2.tar.bz2
rsyslog-18ff8d54dde1d0c8603d5f06800ce3d55eb86fb2.zip
Don't leak configuration value arrays
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-rw-r--r--template.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/template.c b/template.c
index f5260191..7940ab24 100644
--- a/template.c
+++ b/template.c
@@ -1582,6 +1582,8 @@ createPropertyTpe(struct template *pTpl, struct cnfobj *o)
}
finalize_it:
+ if(pvals != NULL)
+ cnfparamvalsDestruct(pvals, &pblkProperty);
if(name != NULL)
rsCStrDestruct(&name);
RETiRet;
@@ -1767,6 +1769,8 @@ tplProcessCnf(struct cnfobj *o)
pTpl->optFormatEscape = JSON_ESCAPE;
finalize_it:
+ if(pvals != NULL)
+ cnfparamvalsDestruct(pvals, &pblk);
if(iRet != RS_RET_OK) {
if(pTpl != NULL) {
/* we simply make the template defunct in this case by setting