Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
0ef2429
)
http_static: fix memory hss_session using after be freed
93/41593/1
author
XiaomingJiang
<
[email protected]
>
Mon, 23 Sep 2024 08:42:40 +0000
(16:42 +0800)
committer
XiaomingJiang
<
[email protected]
>
Mon, 23 Sep 2024 08:42:40 +0000
(16:42 +0800)
Type: fix
Change-Id: Ic3d3de4198310361de876a8224e4f7cd0b48b698
Signed-off-by: XiaomingJiang <
[email protected]
>
src/plugins/http_static/static_server.c
patch
|
blob
|
history
diff --git
a/src/plugins/http_static/static_server.c
b/src/plugins/http_static/static_server.c
index
9d9a68f
..
48e71f5
100644
(file)
--- 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