diff options
author | Michael Biebl <biebl@debian.org> | 2014-08-18 17:48:21 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2014-08-18 17:48:21 +0200 |
commit | edb958301d8c162cb21278d01d802026a1e1afe7 (patch) | |
tree | c0a155296fcfb56c4d2a14adadbe2443eb6947c3 /runtime/conf.c | |
parent | b8bc384c9ff7e258d2d26511302f6feb3e4f5e00 (diff) | |
parent | 1dfcd909d90f6fad4a612b6fd998d7473a9da399 (diff) | |
download | rsyslog-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.c | 9 |
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; |