[PATCH]fix potential memory leaks

This commit is contained in:
liuwentan
2023-10-27 17:31:35 +08:00
parent 9f7c82e6b0
commit 9b5a07ecc6
12 changed files with 29 additions and 9 deletions

View File

@@ -428,10 +428,12 @@ void *adapter_hs_new(struct expr_rule *rules, size_t n_rule,
if (literal_cd != NULL) {
adpt_hs_compile_data_free(literal_cd);
literal_cd = NULL;
}
if (regex_cd != NULL) {
adpt_hs_compile_data_free(regex_cd);
regex_cd = NULL;
}
if (hs_ret < 0) {