fix compile table update bug

This commit is contained in:
liuwentan
2023-02-23 14:50:07 +08:00
parent d1aee82fe2
commit ca1ae3a0de
3 changed files with 45 additions and 2 deletions

View File

@@ -828,6 +828,11 @@ void maat_compile_hash_set(struct maat_compile **compile_hash, long long compile
int maat_compile_hash_remove(struct maat_compile **compile_hash, struct maat_compile *compile,
struct maat_garbage_bin *garbage_bin)
{
if (compile->user_data_free && compile->user_data) {
compile->user_data_free(compile->user_data);
compile->user_data = NULL;
}
if (0 == compile->actual_clause_num) {
HASH_DEL(*compile_hash, compile);
maat_garbage_bagging(garbage_bin, compile, (void (*)(void *))maat_compile_free);