diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-25 17:01:42 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-25 17:01:42 +0200 |
commit | 5b9a6992f73bbbba847402946443b001f8b639df (patch) | |
tree | b7be97348b2512191da070dd5f06db61f35bb0f3 | |
parent | bf95d5f034221fbc49904c30774f4ae269d4df68 (diff) | |
download | rsyslog-5b9a6992f73bbbba847402946443b001f8b639df.tar.gz rsyslog-5b9a6992f73bbbba847402946443b001f8b639df.tar.bz2 rsyslog-5b9a6992f73bbbba847402946443b001f8b639df.zip |
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
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | grammar/rainerscript.c | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -1,5 +1,8 @@ --------------------------------------------------------------------------- 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 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; |