summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXiaomingJiang <jiangxiaoming@outlook.com>2024-09-23 16:42:40 +0800
committerXiaomingJiang <jiangxiaoming@outlook.com>2024-09-23 16:42:40 +0800
commitbf0a6f8876dfb5e748e3786714595d6817a573ec (patch)
tree45b9161a8d32828cd2074dfab7b22dab6e29bb8d /src
parent0ef24297ec37803e9909b082683725259b2f33a6 (diff)
http_static: fix memory hss_session using after be freed
Type: fix Change-Id: Ic3d3de4198310361de876a8224e4f7cd0b48b698 Signed-off-by: XiaomingJiang <jiangxiaoming@outlook.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/http_static/static_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c
index 9d9a68f7d02..48e71f51629 100644
--- a/src/plugins/http_static/static_server.c
+++ b/src/plugins/http_static/static_server.c
@@ -58,8 +58,6 @@ hss_session_free (hss_session_t *hs)
{
hss_main_t *hsm = &hss_main;
- pool_put (hsm->sessions[hs->thread_index], hs);
-
if (CLIB_DEBUG)
{
u32 save_thread_index;
@@ -68,6 +66,8 @@ hss_session_free (hss_session_t *hs)
memset (hs, 0xfa, sizeof (*hs));
hs->thread_index = save_thread_index;
}
+
+ pool_put (hsm->sessions[hs->thread_index], hs);
}
/** \brief Disconnect a session