summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-03-17 18:24:25 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-03-17 18:24:25 +0100
commit68614b3481db24c6bce87288b162352e0a4deb36 (patch)
tree6daac899479f7f08bd3bb205629d1c024e3f714a
parentcb4bc708b1a0b15e6c22fd457b6dfa456e4d3d15 (diff)
downloadrsyslog-68614b3481db24c6bce87288b162352e0a4deb36.tar.gz
rsyslog-68614b3481db24c6bce87288b162352e0a4deb36.tar.xz
rsyslog-68614b3481db24c6bce87288b162352e0a4deb36.zip
bugfix: memory leak in array passing output module mode
-rw-r--r--ChangeLog1
-rw-r--r--action.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ecc43e1..35eabd22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@ Version 6.3.8 [DEVEL] 2012-02-??
a certain way
- bugfix: property $!all-json made rsyslog abort if no normalized data
was available
+- bugfix: memory leak in array passing output module mode
---------------------------------------------------------------------------
Version 6.3.7 [DEVEL] 2012-02-02
- imported refactored v5.9.6 imklog linux driver, now combined with BSD
diff --git a/action.c b/action.c
index 0b0f27c3..f671ce5a 100644
--- a/action.c
+++ b/action.c
@@ -868,8 +868,9 @@ static rsRetVal releaseBatch(action_t *pAction, batch_t *pBatch)
if(((uchar**)ppMsgs)[j] != NULL) {
jArr = 0;
while(ppMsgs[j][jArr] != NULL) {
- d_free(ppMsgs[j][jArr++]);
- ppMsgs[j][jArr++] = NULL;
+ d_free(ppMsgs[j][jArr]);
+ ppMsgs[j][jArr] = NULL;
+ ++jArr;
}
d_free(((uchar**)ppMsgs)[j]);
((uchar**)ppMsgs)[j] = NULL;