From 5b9a6992f73bbbba847402946443b001f8b639df Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 25 Oct 2013 17:01:42 +0200 Subject: bugfix: memory leak in strlen() RainerScript function Thanks to Gregoire Seux for reportig this bug. closes: http://bugzilla.adiscon.com/show_bug.cgi?id=486 --- grammar/rainerscript.c | 1 + 1 file changed, 1 insertion(+) (limited to 'grammar/rainerscript.c') diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index b86f7c30..986d2802 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -1359,6 +1359,7 @@ doFuncCall(struct cnffunc *func, struct var *ret, void* usrptr) estr = var2String(&r[0], &bMustFree); ret->d.n = es_strlen(estr); if(bMustFree) es_deleteStr(estr); + if(r[0].datatype == 'S') es_deleteStr(r[0].d.estr); } ret->datatype = 'N'; break; -- cgit v1.2.3