diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index ee19905..e151fa7 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -33,7 +33,7 @@ #include "stream_fuzzy_hash.h" #include "gram_index_engine.h" -int MAAT_FRAME_VERSION_2_9_20200513=1; +int MAAT_FRAME_VERSION_2_9_20200605=1; int is_valid_table_name(const char* str) { diff --git a/src/entry/Maat_table_runtime.cpp b/src/entry/Maat_table_runtime.cpp index accdc83..74718b7 100644 --- a/src/entry/Maat_table_runtime.cpp +++ b/src/entry/Maat_table_runtime.cpp @@ -440,13 +440,13 @@ int Maat_table_runtime_ip_plugin_rebuild_ip_matcher(struct Maat_table_runtime* t i++; } assert(i==rule_cnt); - if(rule_cnt==0) + if(rule_cnt>0) { - return 0; + new_ip_matcher=ip_matcher_new(rules, rule_cnt, &mem_use); + table_rt->ip_plugin.old_ip_matcher=table_rt->ip_plugin.ip_matcher; + table_rt->ip_plugin.ip_matcher=new_ip_matcher; } - new_ip_matcher=ip_matcher_new(rules, rule_cnt, &mem_use); - table_rt->ip_plugin.old_ip_matcher=table_rt->ip_plugin.ip_matcher; - table_rt->ip_plugin.ip_matcher=new_ip_matcher; + free(rules); return 0; } struct ip_matcher* Maat_table_runtime_dettach_old_ip_matcher(struct Maat_table_runtime* table_rt)