From 36f78940caf6e7b0aae7c1f37bcc4cdba0bf5b15 Mon Sep 17 00:00:00 2001 From: Breno Silva Date: Mon, 22 Oct 2012 08:05:41 -0400 Subject: [PATCH] Fixed bug when used ctl:ruleRemoveByTag --- apache2/re_actions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apache2/re_actions.c b/apache2/re_actions.c index eceb8226..32475d55 100644 --- a/apache2/re_actions.c +++ b/apache2/re_actions.c @@ -1016,7 +1016,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp, return 1; } else if (strcasecmp(name, "ruleRemoveByTag") == 0) { - rule_exception *re = apr_pcalloc(mptmp, sizeof(rule_exception)); + rule_exception *re = apr_pcalloc(msr->mp, sizeof(rule_exception)); re->type = RULE_EXCEPTION_REMOVE_TAG; re->param = (const char *)apr_pstrdup(msr->mp, value); re->param_data = msc_pregcomp(msr->mp, re->param, 0, NULL, NULL); @@ -1034,7 +1034,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp, return 1; } else if (strcasecmp(name, "ruleRemoveByMsg") == 0) { - rule_exception *re = apr_pcalloc(mptmp, sizeof(rule_exception)); + rule_exception *re = apr_pcalloc(msr->mp, sizeof(rule_exception)); re->type = RULE_EXCEPTION_REMOVE_MSG; re->param = (const char *)apr_pstrdup(msr->mp, value); re->param_data = msc_pregcomp(msr->mp, re->param, 0, NULL, NULL);