summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_private.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/vcl_private.c')
-rw-r--r--src/vcl/vcl_private.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index eb01d1c14b1..ba54c91f5cd 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -459,8 +459,11 @@ vcl_session_detach_fifos (vcl_session_t *s)
fifo_segment_free_client_fifo (fs, s->tx_fifo);
if (s->ct_rx_fifo)
{
- fs = fifo_segment_get_segment (&vcm->segment_main,
- s->ct_rx_fifo->segment_index);
+ fs = fifo_segment_get_segment_if_valid (&vcm->segment_main,
+ s->ct_rx_fifo->segment_index);
+ if (!fs)
+ goto done;
+
fifo_segment_free_client_fifo (fs, s->ct_rx_fifo);
fifo_segment_free_client_fifo (fs, s->ct_tx_fifo);
}