summaryrefslogtreecommitdiffstats
path: root/runtime/conf.c
diff options
context:
space:
mode:
authorvarmojfekoj <theinric@redhat.com>2010-02-04 16:02:57 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-02-04 16:02:57 +0100
commit8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127 (patch)
treefde5f05035166bb859f9be7319f70788b4edb8ef /runtime/conf.c
parent7d098f14cba4f31dec7d92136183ebd0ccf7e1d0 (diff)
downloadrsyslog-8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127.tar.gz
rsyslog-8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127.tar.xz
rsyslog-8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127.zip
bugfix: several smaller bugs resolved after flexelint review
Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
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 a1d74b93..34752726 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -500,7 +500,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;
@@ -537,10 +537,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;