From b3d1e45c349f84e8c1e036b3d86521ece023e321 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Mon, 18 Sep 2017 20:15:59 +0800 Subject: [PATCH] =?UTF-8?q?Maat=20Command=E4=BF=AE=E5=A4=8DBug=EF=BC=9A?= =?UTF-8?q?=E4=B8=8B=E5=8F=91IP=E8=A7=84=E5=88=99=E5=AD=98=E5=9C=A8double?= =?UTF-8?q?=20free=E7=9A=84bug=EF=BC=8C=E5=90=8C=E6=97=B6redis=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E6=97=B6=E6=93=8D=E4=BD=9C=E4=BA=86=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84ctx=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_command.cpp | 6 +++--- src/entry/Maat_rule.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index 89177b6..17de4ce 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -78,7 +78,7 @@ int connect_redis_for_write(_Maat_feather_t * feather) } else { - reply=_wrap_redisCommand(feather->redis_read_ctx, "select %d",feather->redis_index); + reply=_wrap_redisCommand(feather->redis_write_ctx, "select %d",feather->redis_index); freeReplyObject(reply); } return ret; @@ -1088,7 +1088,7 @@ void _maat_copy_region(struct Maat_region_t* dst,const struct Maat_region_t* src dst->ip_rule.src_ip=_maat_strdup(src->ip_rule.src_ip); dst->ip_rule.mask_src_ip=_maat_strdup(src->ip_rule.mask_src_ip); dst->ip_rule.dst_ip=_maat_strdup(src->ip_rule.dst_ip); - dst->ip_rule.mask_src_ip=_maat_strdup(src->ip_rule.mask_src_ip); + dst->ip_rule.mask_dst_ip=_maat_strdup(src->ip_rule.mask_dst_ip); break; case REGION_EXPR: dst->expr_rule.keywords=_maat_strdup(src->expr_rule.keywords); @@ -1117,7 +1117,7 @@ void _maat_empty_region(struct Maat_region_t* p) free((char*)p->ip_rule.src_ip); free((char*)p->ip_rule.mask_src_ip); free((char*)p->ip_rule.dst_ip); - free((char*)p->ip_rule.mask_src_ip); + free((char*)p->ip_rule.mask_dst_ip); break; case REGION_EXPR: free((char*)p->expr_rule.keywords); diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 580c026..71d2489 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -30,7 +30,7 @@ #include "stream_fuzzy_hash.h" #include "gram_index_engine.h" -int MAAT_FRAME_VERSION_2_0_20170916=1; +int MAAT_FRAME_VERSION_2_0_20170918=1; const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin", "unicode_ascii_esc","unicode_ascii_aligned","unicode_ncr_dec","unicode_ncr_hex","url_encode_gb2312","url_encode_utf8",""};