mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Revert "Avoid some useless code and memory allocation in case no macro is present"
This commit is contained in:
@@ -273,7 +273,6 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t
|
|||||||
next_text_start = p + 1;
|
next_text_start = p + 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (arr->nelts == 0) return 0; /* no macro */
|
|
||||||
/* Text part. */
|
/* Text part. */
|
||||||
part = (msc_string *)apr_pcalloc(mptmp, sizeof(msc_string));
|
part = (msc_string *)apr_pcalloc(mptmp, sizeof(msc_string));
|
||||||
part->value = apr_pstrdup(mptmp, text_start);
|
part->value = apr_pstrdup(mptmp, text_start);
|
||||||
|
Reference in New Issue
Block a user