summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-02-09 09:46:22 -0800
committerDave Barach <openvpp@barachs.net>2021-02-09 20:56:09 +0000
commitda2305fb874a7cf6573267adb87166564e328396 (patch)
tree67938487634d7ca635b098bfae55b4417f506073 /src/vnet/session
parent74b2a9b2c6a3d25cd02b1757816ce1a598a03a03 (diff)
session: coverity fixes
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2828287c58115aa08c0a4297c01cea60f41f4749
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session_node.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 2c91a2fe092..2e21f26ec29 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -472,8 +472,10 @@ session_mq_worker_update_handler (void *data)
evt->event_type = SESSION_CTRL_EVT_WORKER_UPDATE_REPLY;
rmp = (session_worker_update_reply_msg_t *) evt->data;
rmp->handle = mp->handle;
- rmp->rx_fifo = fifo_segment_fifo_offset (s->rx_fifo);
- rmp->tx_fifo = fifo_segment_fifo_offset (s->tx_fifo);
+ if (s->rx_fifo)
+ rmp->rx_fifo = fifo_segment_fifo_offset (s->rx_fifo);
+ if (s->tx_fifo)
+ rmp->tx_fifo = fifo_segment_fifo_offset (s->tx_fifo);
rmp->segment_handle = session_segment_handle (s);
svm_msg_q_add_and_unlock (app_wrk->event_queue, msg);