summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2023-08-22 23:42:02 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2023-09-13 15:50:15 +0000
commit7f9b690b06571da41400925c17b2e7de86f746f6 (patch)
tree0ea16b190730daed2972b7f95d9519bc0f54d370
parent7bf8f5e484a49fd90db1c4c4e38d82810bddada8 (diff)
api: fix vlibmemory coverity warning CID-300152
Type: fix Change-Id: Icdebc8629946e0e7c8dde3e45ee93ff9027e7c68 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
-rw-r--r--src/vlibmemory/socket_api.c4
1 files changed, 4 insertions, 0 deletions
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,