diff options
author | Steven Luong <sluong@cisco.com> | 2024-06-28 15:12:11 -0700 |
---|---|---|
committer | Steven Luong <sluong@cisco.com> | 2024-06-28 15:19:08 -0700 |
commit | d2d41bc34e1663803037fc0a6c7bda9078cef2b6 (patch) | |
tree | f067ffe0b6b6aaaae19dad00ec3f10173d758a98 /src/vnet/tcp/tcp_timer.c | |
parent | 6d44aabe8d5e0015fd851788ef7c7bee48340dee (diff) |
session: memory leaks on various transports when session disable and enable
When toggling session disable and enable, memory leaks found on various
transports.
Don't create the timer wheels on enable when they are already creaded.
Don't create the spin locks when they are already created.
Add session enable disable test in session unit test.
Type: fix
Change-Id: I08988a96bbf2d67a67c743b50b63f5b1e27402a3
Signed-off-by: Steven Luong <sluong@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_timer.c')
-rw-r--r-- | src/vnet/tcp/tcp_timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp_timer.c b/src/vnet/tcp/tcp_timer.c index d98d0d14b17..8ae3f22eaa6 100644 --- a/src/vnet/tcp/tcp_timer.c +++ b/src/vnet/tcp/tcp_timer.c @@ -20,6 +20,8 @@ void tcp_timer_initialize_wheel (tcp_timer_wheel_t * tw, void (*expired_timer_cb) (u32 *), f64 now) { + if (tw->timers) + return; tw_timer_wheel_init_tcp_twsl (tw, expired_timer_cb, TCP_TIMER_TICK, ~0); tw->last_run_time = now; } |