Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
0dc3f19
)
memif: fix coverity warnings
77/6977/2
author
Steven
<sluong@cisco.com>
Thu, 1 Jun 2017 21:25:15 +0000
(14:25 -0700)
committer
Chris Luke
<chris_luke@comcast.com>
Fri, 2 Jun 2017 12:58:34 +0000
(12:58 +0000)
Check -1 for return from read prior to using the data
Change-Id: Ibab7309244de488737ea7938b334fab495bf855d
Signed-off-by: Steven <sluong@cisco.com>
src/plugins/memif/memif.c
patch
|
blob
|
history
diff --git
a/src/plugins/memif/memif.c
b/src/plugins/memif/memif.c
index
a671bda
..
7d2a09a
100644
(file)
--- 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);