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);

View File

@@ -487,10 +487,9 @@ void *rule_monitor_loop(void *arg)
if (time_window >= maat_instance->rule_effect_interval_ms / 1000) {
maat_runtime_commit(maat_instance->maat_rt, maat_instance->logger);
log_info(maat_instance->logger, MODULE_MAAT_RULE,
"Actual update config version %u, %d entries load to rulescan after postpone.",
"Actual update config version %u, %d entries load to maat runtime.",
maat_instance->maat_rt->version, maat_instance->maat_rt->rule_num);
}
}
pthread_mutex_unlock(&(maat_instance->background_update_mutex));