修复删除FQDN Plugin配置时产生的内存泄露。
This commit is contained in:
@@ -775,6 +775,12 @@ static struct bool_matcher* Maat_hierarchy_build_bool_matcher(struct Maat_hierar
|
||||
|
||||
//STEP 3, serial clause states to a bool expression array.
|
||||
compile_num=HASH_COUNT(hier->hash_compile_by_id);
|
||||
if(compile_num==0)
|
||||
{
|
||||
MESA_handle_runtime_log(hier->logger, RLOG_LV_FATAL, module_maat_hierarchy,
|
||||
"No compile to build.");
|
||||
return NULL;
|
||||
}
|
||||
bool_expr_array=ALLOC(struct bool_expr, compile_num);
|
||||
HASH_ITER(hh, hier->hash_compile_by_id, compile, tmp_compile)
|
||||
{
|
||||
@@ -806,7 +812,7 @@ static struct bool_matcher* Maat_hierarchy_build_bool_matcher(struct Maat_hierar
|
||||
if(expr_cnt==0)
|
||||
{
|
||||
MESA_handle_runtime_log(hier->logger, RLOG_LV_FATAL, module_maat_hierarchy,
|
||||
"No expr to build.");
|
||||
"No bool expression to build.");
|
||||
return NULL;
|
||||
}
|
||||
bm=bool_matcher_new(bool_expr_array, expr_cnt, hier->thread_num, &mem_size);
|
||||
|
||||
@@ -56,7 +56,7 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
int MAAT_FRAME_VERSION_3_0_20200927=1;
|
||||
int MAAT_FRAME_VERSION_3_0_20201019=1;
|
||||
|
||||
int is_valid_table_name(const char* str)
|
||||
{
|
||||
|
||||
@@ -469,11 +469,10 @@ void Maat_table_runtime_fqdn_plugin_new_row(struct Maat_table_runtime* table_rt,
|
||||
fqdn_plugin_schema->fqdn_column, row);
|
||||
return;
|
||||
}
|
||||
fqdn_rule=fqdn_rule_new((unsigned int)atoi(row+row_id_offset), row+fqdn_offset, fqdn_len, atoi(row+is_suffix_flag_offset));
|
||||
|
||||
if(atoi(row+is_valid_offset)==1)//add
|
||||
{
|
||||
|
||||
fqdn_rule=fqdn_rule_new((unsigned int)atoi(row+row_id_offset), row+fqdn_offset, fqdn_len, atoi(row+is_suffix_flag_offset));
|
||||
EX_data_rt_row2EX_data(fqdn_plugin_rt->ex_data_rt, row, row+row_id_offset, row_id_len, fqdn_rule, logger);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user