aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2017-06-01 14:25:15 -0700
committerChris Luke <chris_luke@comcast.com>2017-06-02 12:58:34 +0000
commitf98bb74372410ed207891b744285cdb0618b560b (patch)
tree17d03febbe28926ba60e4e35554ea167a5ca0501 /src/plugins/memif
parent0dc3f191947a9b8e914fa188f4652f700ff06944 (diff)
memif: fix coverity warnings
Check -1 for return from read prior to using the data Change-Id: Ibab7309244de488737ea7938b334fab495bf855d Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/plugins/memif')
-rw-r--r--src/plugins/memif/memif.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index a671bda51f7..7d2a09a2a63 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -472,6 +472,8 @@ memif_int_fd_read_ready (unix_file_t * uf)
mif->interrupt_line.index = ~0;
mif->interrupt_line.fd = -1;
}
+ else if (size < 0)
+ DEBUG_UNIX_LOG ("Failed to read from socket");
else
vnet_device_input_set_interrupt_pending (vnm, mif->hw_if_index, b);