From 899ae69a4b3a33e4e295b28966ea7e570d087cf2 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Thu, 15 Oct 2020 14:16:55 +0800 Subject: 扫描拦截排除功能导致内存泄漏;dictator_malloc函数使用参数不正确 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tsg_rule.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/tsg_rule.cpp') diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index 3acaa63..5362761 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -147,11 +147,17 @@ static int get_data_center(char *accept_tag, char *data_center, int data_center_ len=strlen(v_item->valuestring); memcpy(data_center, v_item->valuestring, (len>data_center_len-1 ? data_center_len-1 : len)); } + + cJSON_Delete(object); + object=NULL; return 1; } } } } + + cJSON_Delete(object); + object=NULL; } return 0; -- cgit v1.2.3