bugfix: memory leak in array passing output module mode
authorRainer Gerhards <rgerhards@adiscon.com>
Sat, 17 Mar 2012 17:31:14 +0000 (18:31 +0100)
committerRainer Gerhards <rgerhards@adiscon.com>
Sat, 17 Mar 2012 17:31:14 +0000 (18:31 +0100)
ChangeLog
action.c

index 98a1e28..83e7f4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
 ---------------------------------------------------------------------------
+Version 5.8.10  [V5-stable] 2012-??-??
+- bugfix: memory leak in array passing output module mode
+---------------------------------------------------------------------------
 Version 5.8.9  [V5-stable] 2012-03-15
 - added tool to recover disk queue if .qi file is missing (recover_qi.pl)
   Thanks to Kaiwang Chen for contributing this tool
index 278625c..e859cce 100644 (file)
--- 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;