From 7f9b690b06571da41400925c17b2e7de86f746f6 Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Tue, 22 Aug 2023 23:42:02 -0400 Subject: api: fix vlibmemory coverity warning CID-300152 Type: fix Change-Id: Icdebc8629946e0e7c8dde3e45ee93ff9027e7c68 Signed-off-by: Dave Wallace --- src/vlibmemory/socket_api.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/vlibmemory') diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c index 24a460979f4..c139b652609 100644 --- a/src/vlibmemory/socket_api.c +++ b/src/vlibmemory/socket_api.c @@ -288,6 +288,10 @@ vl_socket_read_ready (clib_file_t * uf) } rp = vl_socket_get_registration (reg_index); + if (!rp) + { + return 0; + } /* Ignore unprocessed_input for now, n describes input_buffer for now. */ n = read (uf->file_descriptor, socket_main.input_buffer, -- cgit 1.2.3-korg