summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--grammar/rainerscript.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 18c3ed9a..2ed92004 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -181,6 +181,9 @@ Version 7.5.0 [devel] 2013-06-11
Thanks to Axel Rau for the patch.
---------------------------------------------------------------------------
Version 7.4.6 [v7.4-stable] 2013-11-??
+- 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
- bugfix: buffer overrun if re_extract function was called for submatch 50
Thanks to Pavel Levshin for reporting the problem and its location.
- bugfix: memleak in re_extract() function
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index f49d2aa1..e41efa04 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -1477,6 +1477,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;