From 8c3ab2e26f1bae46ff34fc1d0a10a69c4db78127 Mon Sep 17 00:00:00 2001 From: varmojfekoj Date: Thu, 4 Feb 2010 16:02:57 +0100 Subject: bugfix: several smaller bugs resolved after flexelint review Signed-off-by: Rainer Gerhards --- runtime/conf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'runtime/conf.c') 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; -- cgit v1.2.3