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:
d5a5882
)
lacp: coverity fix on null pointer dereference
43/32343/2
author
Steven Luong
<
[email protected]
>
Fri, 14 May 2021 22:33:01 +0000
(15:33 -0700)
committer
Matthew Smith
<
[email protected]
>
Sat, 15 May 2021 23:49:42 +0000
(23:49 +0000)
Coverity complains on null pointer dereference. It is not likely to
happen.
Type: fix
Signed-off-by: Steven Luong <
[email protected]
>
Change-Id: Iab726a1e2d60725cec7ab0bbd2787b62e6393d33
src/plugins/lacp/selection.c
patch
|
blob
|
history
diff --git
a/src/plugins/lacp/selection.c
b/src/plugins/lacp/selection.c
index
0c9f036
..
1588ebf
100644
(file)
--- a/
src/plugins/lacp/selection.c
+++ b/
src/plugins/lacp/selection.c
@@
-40,8
+40,8
@@
lacp_set_port_selected (vlib_main_t *vm, bond_if_t *bif, member_if_t *mif)
{
p = *vec_elt_at_index (bif->active_members, 0);
mif2 = bond_get_member_by_sw_if_index (p);
- if ((mif2->partner.key != mif->partner.key) ||
-
memcmp (mif2->partner.system, mif->partner.system, 6
))
+ if (
mif2 && (
(mif2->partner.key != mif->partner.key) ||
+
memcmp (mif2->partner.system, mif->partner.system, 6)
))
{
mif->selected = LACP_PORT_UNSELECTED;
lacp_machine_dispatch (&lacp_mux_machine, vm, mif,