summaryrefslogtreecommitdiffstats
path: root/runtime/conf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-02-04 16:51:53 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-02-04 16:51:53 +0100
commit8149d06f97d94ec2ae1f3fe117a775f8dcd7ef75 (patch)
treeeba44b9103882a26915f2d13bd36fc2ed08541a1 /runtime/conf.c
parent4cefc40064a07f6c9c8ab8def2ecbb87b336debe (diff)
parentd71e8672c90628fdfa58ad860833d78cfd5941d8 (diff)
downloadrsyslog-8149d06f97d94ec2ae1f3fe117a775f8dcd7ef75.tar.gz
rsyslog-8149d06f97d94ec2ae1f3fe117a775f8dcd7ef75.tar.bz2
rsyslog-8149d06f97d94ec2ae1f3fe117a775f8dcd7ef75.zip
Merge branch 'beta'
Diffstat (limited to 'runtime/conf.c')
-rw-r--r--runtime/conf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/conf.c b/runtime/conf.c
index e7c1576f..96d9dcab 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -512,7 +512,7 @@ finalize_it:
rsRetVal cflineParseTemplateName(uchar** pp, omodStringRequest_t *pOMSR, int iEntry, int iTplOpts, uchar *dfltTplName)
{
uchar *p;
- uchar *tplName;
+ uchar *tplName = NULL;
cstr_t *pStrB;
DEFiRet;
@@ -549,10 +549,12 @@ rsRetVal cflineParseTemplateName(uchar** pp, omodStringRequest_t *pOMSR, int iEn
CHKiRet(cstrConvSzStrAndDestruct(pStrB, &tplName, 0));
}
- iRet = OMSRsetEntry(pOMSR, iEntry, tplName, iTplOpts);
- if(iRet != RS_RET_OK) goto finalize_it;
+ CHKiRet(OMSRsetEntry(pOMSR, iEntry, tplName, iTplOpts));
finalize_it:
+ if(iRet != RS_RET_OK)
+ free(tplName);
+
*pp = p;
RETiRet;