summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-03-17 18:31:14 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-03-17 18:31:14 +0100
commit59c99b2d8b23f8903e2130b7a149981afe1a8bd3 (patch)
treefcc5118a875a75ab3ef0db4e5469d81372cf7989 /action.c
parent43607c303cdaf5adc4983c559fab66942e98cbe5 (diff)
downloadrsyslog-59c99b2d8b23f8903e2130b7a149981afe1a8bd3.tar.gz
rsyslog-59c99b2d8b23f8903e2130b7a149981afe1a8bd3.tar.xz
rsyslog-59c99b2d8b23f8903e2130b7a149981afe1a8bd3.zip
bugfix: memory leak in array passing output module mode
Diffstat (limited to 'action.c')
-rw-r--r--action.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/action.c b/action.c
index 278625ce..e859cce4 100644
--- a/action.c
+++ b/action.c
@@ -785,8 +785,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;