diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-12-01 17:50:29 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-12-01 17:50:29 +0100 |
commit | f871bd135a33c88a013f49402d0af87fb1f1de5d (patch) | |
tree | ee05d17ecb6a79a6eb680f00a24eede22f4acf49 /action.c | |
parent | 48877c8ef41787d59a062ab07f5b6ee37eba7ce1 (diff) | |
download | rsyslog-f871bd135a33c88a013f49402d0af87fb1f1de5d.tar.gz rsyslog-f871bd135a33c88a013f49402d0af87fb1f1de5d.tar.xz rsyslog-f871bd135a33c88a013f49402d0af87fb1f1de5d.zip |
bugfix: memory leak if different passing modes were used in actions
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -775,6 +775,14 @@ finalize_it: */ switch(pThis->eParamPassing) { case ACT_STRING_PASSING: + /* nothing to do in this case */ + /* TODO: find a better way of handling this situation, as it + * costs performance to delete this array each time. + */ + for(i = 0 ; i < pThis->iNumTpls ; ++i) { + free(((uchar**)actParams)[i]); + ((uchar**)actParams)[i] = NULL; + } break; case ACT_ARRAY_PASSING: cleanupDoActionParams(pThis, actParams); /* iRet ignored! */ |