From 685e4ada9a0e155ddbb3547bdb8d04f33da8b3bb Mon Sep 17 00:00:00 2001 From: wangmenglan Date: Fri, 26 May 2023 18:54:59 +0800 Subject: [PATCH] bugfix: memleak --- common/src/tfe_packet_io.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/src/tfe_packet_io.cpp b/common/src/tfe_packet_io.cpp index 8895b62..e829e22 100644 --- a/common/src/tfe_packet_io.cpp +++ b/common/src/tfe_packet_io.cpp @@ -246,6 +246,12 @@ static void session_ctx_free(struct session_ctx *ctx) { if (ctx) { + if (ctx->session_addr) + { + free(ctx->session_addr); + ctx->session_addr = NULL; + } + if (ctx->cmsg) { tfe_cmsg_destroy(ctx->cmsg);