diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-02-25 11:05:57 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-02-25 11:05:57 +0100 |
commit | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 (patch) | |
tree | 800c102df822eacd8f1f5a651b71008e800eec67 /runtime | |
parent | 237df37a86479e1f60e73bdcd1da15ccc319fa15 (diff) | |
download | rsyslog-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
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/queue.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |