summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-02-25 11:05:57 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-02-25 11:05:57 +0100
commitdfa88369d4ca4290db56b843f9eabdae1bfe0fd5 (patch)
tree800c102df822eacd8f1f5a651b71008e800eec67
parent237df37a86479e1f60e73bdcd1da15ccc319fa15 (diff)
downloadrsyslog-dfa88369d4ca4290db56b843f9eabdae1bfe0fd5.tar.gz
rsyslog-dfa88369d4ca4290db56b843f9eabdae1bfe0fd5.tar.xz
rsyslog-dfa88369d4ca4290db56b843f9eabdae1bfe0fd5.zip
bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225
-rw-r--r--ChangeLog4
-rw-r--r--runtime/queue.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 14723f3d..324fc999 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------
+Version 5.6.4 [V5-STABLE] (rgerhards), 2011-02-25
+- bugfix: memory leak when $RepeatedMsgReduction on was used
+ bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225
+---------------------------------------------------------------------------
Version 5.6.3 [V5-STABLE] (rgerhards), 2011-01-26
- bugfix: action processor released mememory too early, resulting in
potential issue in retry cases (but very unlikely due to another
diff --git a/runtime/queue.c b/runtime/queue.c
index c2806ca1..ae08c859 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -839,6 +839,7 @@ static rsRetVal qAddDirect(qqueue_t *pThis, void* pUsr)
{
batch_t singleBatch;
batch_obj_t batchObj;
+ int i;
DEFiRet;
//TODO: init batchObj (states _OK and new fields -- CHECK)
@@ -860,6 +861,10 @@ static rsRetVal qAddDirect(qqueue_t *pThis, void* pUsr)
singleBatch.nElem = 1; /* there always is only one in direct mode */
singleBatch.pElem = &batchObj;
iRet = pThis->pConsumer(pThis->pUsr, &singleBatch, &pThis->bShutdownImmediate);
+ /* delete the batch string params: TODO: create its own "class" for this */
+ for(i = 0 ; i < CONF_OMOD_NUMSTRINGS_MAXSIZE ; ++i) {
+ free(batchObj.staticActStrings[i]);
+ }
objDestruct(pUsr);
RETiRet;