git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1498060
)
net/bnxt: fix a pointer deref before null check
author
Ajit Khaparde
<ajit.khaparde@broadcom.com>
Tue, 24 Oct 2017 21:19:47 +0000
(16:19 -0500)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000
(
02:33
+0200)
Coverity issue: 195015
Fixes:
b7435d660a8c
("net/bnxt: add ntuple filtering support")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c
patch
|
blob
|
history
diff --git
a/drivers/net/bnxt/bnxt_ethdev.c
b/drivers/net/bnxt/bnxt_ethdev.c
index
9065a12
..
c2d54ef
100644
(file)
--- a/
drivers/net/bnxt/bnxt_ethdev.c
+++ b/
drivers/net/bnxt/bnxt_ethdev.c
@@
-2039,6
+2039,11
@@
bnxt_cfg_ntuple_filter(struct bnxt *bp,
goto free_filter;
STAILQ_INSERT_TAIL(&vnic->filter, bfilter, next);
} else {
+ if (mfilter == NULL) {
+ /* This should not happen. But for Coverity! */
+ ret = -ENOENT;
+ goto free_filter;
+ }
ret = bnxt_hwrm_clear_ntuple_filter(bp, mfilter);
STAILQ_REMOVE(&vnic->filter, mfilter, bnxt_filter_info,