aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-12-01 18:47:45 -0800
committerDave Barach <vpp@barachs.net>2023-12-02 23:37:19 +0000
commit94a52d795d4cdf3ed326409247f4f30c0a6e4f2b (patch)
tree6983d63fa0cdea5199768ab9648ba19d1560182d
parent2c5e2184efd95d7c011ab9a4c6d8fd588e051ed7 (diff)
session: no segment handle on worker del
Coverity report. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3ce06634b30688d2a9581b50d462092daa8b4cac
-rw-r--r--src/vnet/session/session_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 06edb82bdb3..0574a58c723 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -709,9 +709,9 @@ done:
((!rv && mp->is_add) ? vec_len (args.segment->name) : 0), ({
rmp->is_add = mp->is_add;
rmp->wrk_index = clib_host_to_net_u32 (args.wrk_map_index);
- rmp->segment_handle = clib_host_to_net_u64 (args.segment_handle);
if (!rv && mp->is_add)
{
+ rmp->segment_handle = clib_host_to_net_u64 (args.segment_handle);
rmp->app_event_queue_address =
fifo_segment_msg_q_offset ((fifo_segment_t *) args.segment, 0);
rmp->n_fds = n_fds;
@@ -1473,9 +1473,9 @@ done:
rmp->is_add = mp->is_add;
rmp->api_client_handle = sapi_handle;
rmp->wrk_index = args.wrk_map_index;
- rmp->segment_handle = args.segment_handle;
if (!rv && mp->is_add)
{
+ rmp->segment_handle = args.segment_handle;
/* No segment name and size. This supports only memfds */
rmp->app_event_queue_address =
fifo_segment_msg_q_offset ((fifo_segment_t *) args.segment, 0);