修复多处内存泄漏。

This commit is contained in:
zhengchao
2018-11-29 16:24:45 +08:00
parent bcfed2bab1
commit f76a8c5ca2
7 changed files with 48 additions and 28 deletions

View File

@@ -463,6 +463,7 @@ void http_repl_ctx_free(struct replace_ctx* rep_ctx)
FREE(&(rep_ctx->rule[i].find));
FREE(&(rep_ctx->rule[i].replace_with));
}
FREE(&(rep_ctx->rule));
if (rep_ctx->http_body)
{
evbuffer_free(rep_ctx->http_body);
@@ -939,7 +940,7 @@ enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_ht
break;
}
const char * str_field_name = http_field_to_string(&field_name);
const char * str_field_name = http_field_name_to_string(&field_name);
scan_ret = Maat_set_scan_status(g_pangu_rt->maat, &(ctx->scan_mid), MAAT_SET_SCAN_DISTRICT,
str_field_name, strlen(str_field_name));