On 02/09/2021 11:47, Yunjian Wang wrote: > The function bond_member_lookup() could return NULL, the return value > need to be checked. > > Found by Coverity. > > Reported-at: > https://scan8.coverity.com/reports.htm#v48222/p12487/fileInstanceId=29689046&defectInstanceId=10109012&mergedDefectId=279245
This doesn't appear to be available to the public, or maybe it just doesn't like me. If others cannot access it too, then I would just remove the tag. To save on a respin just for this, maybe maintainer could remove on apply. > Signed-off-by: Yunjian Wang <wangyunj...@huawei.com> > Acked-by: Kevin Traynor <ktray...@redhat.com> > --- > v2: > * Update commit msg suggested by Kevin Traynor > --- > ofproto/bond.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/ofproto/bond.c b/ofproto/bond.c > index a4116588f..2dcfeda71 100644 > --- a/ofproto/bond.c > +++ b/ofproto/bond.c > @@ -672,8 +672,13 @@ out: > void > bond_member_set_may_enable(struct bond *bond, void *member_, bool may_enable) > { > + struct bond_member *member; > + > ovs_rwlock_wrlock(&rwlock); > - bond_member_lookup(bond, member_)->may_enable = may_enable; > + member = bond_member_lookup(bond, member_); > + if (member) { > + member->may_enable = may_enable; > + } > ovs_rwlock_unlock(&rwlock); > } > > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev