summaryrefslogtreecommitdiff
path: root/runtime/conf.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2014-08-18 17:48:21 +0200
committerMichael Biebl <biebl@debian.org>2014-08-18 17:48:21 +0200
commitedb958301d8c162cb21278d01d802026a1e1afe7 (patch)
treec0a155296fcfb56c4d2a14adadbe2443eb6947c3 /runtime/conf.c
parentb8bc384c9ff7e258d2d26511302f6feb3e4f5e00 (diff)
parent1dfcd909d90f6fad4a612b6fd998d7473a9da399 (diff)
downloadrsyslog-edb958301d8c162cb21278d01d802026a1e1afe7.tar.gz
Merge tag 'upstream/8.4.0'
Upstream version 8.4.0
Diffstat (limited to 'runtime/conf.c')
-rw-r--r--runtime/conf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/conf.c b/runtime/conf.c
index 83931bc..87600ad 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -261,7 +261,7 @@ rsRetVal cflineParseTemplateName(uchar** pp, omodStringRequest_t *pOMSR, int iEn
{
uchar *p;
uchar *tplName = NULL;
- cstr_t *pStrB;
+ cstr_t *pStrB = NULL;
DEFiRet;
ASSERT(pp != NULL);
@@ -294,14 +294,17 @@ rsRetVal cflineParseTemplateName(uchar** pp, omodStringRequest_t *pOMSR, int iEn
++p;
}
CHKiRet(cstrFinalize(pStrB));
- CHKiRet(cstrConvSzStrAndDestruct(pStrB, &tplName, 0));
+ CHKiRet(cstrConvSzStrAndDestruct(&pStrB, &tplName, 0));
}
CHKiRet(OMSRsetEntry(pOMSR, iEntry, tplName, iTplOpts));
finalize_it:
- if(iRet != RS_RET_OK)
+ if(iRet != RS_RET_OK) {
free(tplName);
+ if(pStrB != NULL)
+ cstrDestruct(&pStrB);
+ }
*pp = p;