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:
89665ec
)
net/cxgbe: fix possible null pointer dereference
author
Henry Cai
<caihe@huawei.com>
Tue, 28 Mar 2017 07:32:20 +0000
(15:32 +0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000
(15:37 +0200)
Check return value of malloc.
Fixes:
3bd122eef2cc
("cxgbe/base: add hardware API for Chelsio T5 series adapters")
Cc: stable@dpdk.org
Signed-off-by: Henry Cai <caihe@huawei.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
drivers/net/cxgbe/base/t4_hw.c
patch
|
blob
|
history
diff --git
a/drivers/net/cxgbe/base/t4_hw.c
b/drivers/net/cxgbe/base/t4_hw.c
index
c089b06
..
9dca8da
100644
(file)
--- a/
drivers/net/cxgbe/base/t4_hw.c
+++ b/
drivers/net/cxgbe/base/t4_hw.c
@@
-359,6
+359,9
@@
int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
struct mbox_entry entry;
u32 pcie_fw = 0;
+ if (!temp)
+ return -ENOMEM;
+
if ((size & 15) || size > MBOX_LEN) {
free(temp);
return -EINVAL;