diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | grammar/rainerscript.c | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 7.4.6 [v7.4-stable] 2013-11-?? +- bugfix: memleak in re_extract() function + Thanks to Pavel Levshin for reporting this problem. - bugfix: memory leak in omhiredis Thanks to Pavel Levshin for the fix - bugfix: segfault if variable was assigned to non-container subtree diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index 63bb6f67..9cacb4ae 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -1307,11 +1307,12 @@ doFunc_re_extract(struct cnffunc *func, struct var *ret, void* usrptr) iLenBuf); } +finalize_it: if(bMustFree) free(str); if(r[0].datatype == 'S') es_deleteStr(r[0].d.estr); if(r[2].datatype == 'S') es_deleteStr(r[2].d.estr); if(r[3].datatype == 'S') es_deleteStr(r[3].d.estr); -finalize_it: + if(bHadNoMatch) { cnfexprEval(func->expr[4], &r[4], usrptr); estr = var2String(&r[4], &bMustFree); |