Merge pull request #2953 from marcstern/v2/mst/optim1

remove useless apr_pstrdup()
This commit is contained in:
Marc Stern 2024-02-01 11:09:31 +01:00 committed by GitHub
commit ac04a4483e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,9 +183,9 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t
* no macros in the input data.
*/
data = apr_pstrdup(mptmp, var->value); /* IMP1 Are we modifying data anywhere? */
data = var->value;
arr = apr_array_make(mptmp, 16, sizeof(msc_string *));
if ((data == NULL)||(arr == NULL)) return -1;
if (arr == NULL) return -1;
text_start = next_text_start = data;
do {