From cdc306767df06937c2d14b459a6963154fb6d400 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 23 Oct 2013 16:10:55 +0200 Subject: fix small memleak introduced during refactoring --- template.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/template.c b/template.c index b4f28443..ebb3f422 100644 --- a/template.c +++ b/template.c @@ -754,7 +754,7 @@ static rsRetVal do_Parameter(uchar **pp, struct template *pTpl) { uchar *p; - cstr_t *pStrProp; + cstr_t *pStrProp = NULL; cstr_t *pStrField = NULL; struct templateEntry *pTpe; int iNum; /* to compute numbers */ @@ -1099,10 +1099,11 @@ do_Parameter(uchar **pp, struct template *pTpl) DBGPRINTF("template/do_Parameter: fieldName is NULL!\n"); ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY); } - cstrDestruct(&pStrProp); if(*p) ++p; /* eat '%' */ *pp = p; finalize_it: + if(pStrProp != NULL) + cstrDestruct(&pStrProp); RETiRet; } -- cgit v1.2.3