From f871bd135a33c88a013f49402d0af87fb1f1de5d Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 1 Dec 2010 17:50:29 +0100 Subject: bugfix: memory leak if different passing modes were used in actions --- action.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'action.c') diff --git a/action.c b/action.c index 74b4456b..bb5767cd 100644 --- a/action.c +++ b/action.c @@ -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! */ -- cgit v1.2.3