mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
force pointers to null after free()
This commit is contained in:
@@ -86,6 +86,7 @@ char *update_rule_target(cmd_parms *cmd, directory_config *dcfg,
|
|||||||
replace = strdup(p3);
|
replace = strdup(p3);
|
||||||
if(replace == NULL) {
|
if(replace == NULL) {
|
||||||
free(target_list);
|
free(target_list);
|
||||||
|
target_list = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -217,8 +218,10 @@ char *update_rule_target(cmd_parms *cmd, directory_config *dcfg,
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(target != NULL)
|
if(target != NULL) {
|
||||||
free(target);
|
free(target);
|
||||||
|
target = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rc = msre_parse_targets(ruleset, p, rule->targets, &my_error_msg);
|
rc = msre_parse_targets(ruleset, p, rule->targets, &my_error_msg);
|
||||||
|
Reference in New Issue
Block a user