Revert "Double memory allocation"

This commit is contained in:
Ervin Hegedus 2024-02-07 23:09:59 +01:00 committed by GitHub
parent fab9b08fe7
commit 5cbd7e6e6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -499,7 +499,7 @@ char *update_rule_target_ex(modsec_rec *msr, msre_ruleset *ruleset, msre_rule *r
if(var_appended == 1) {
current_targets = msre_generate_target_string(ruleset->mp, rule);
rule->unparsed = msre_rule_generate_unparsed(ruleset->mp, rule, current_targets, NULL, NULL);
rule->p1 = current_targets;
rule->p1 = apr_pstrdup(ruleset->mp, current_targets);
if(msr) {
msr_log(msr, 9, "Successfully appended variable");
}