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:
c771499
)
net/enic: fix possible null pointer dereference
author
RongQiang Xie
<xie.rongqiang@zte.com.cn>
Wed, 23 Aug 2017 08:49:24 +0000
(16:49 +0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:47 +0000
(
02:49
+0200)
In enic_alloc_consistent() function, if rte_malloc for mze is failed,
!mze is true, memzone should be freed and function should return NULL.
Fixes:
da5f560be966
("net/enic: fix memory freeing")
Cc: stable@dpdk.org
Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/enic/enic_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/enic/enic_main.c
b/drivers/net/enic/enic_main.c
index
40dbec7
..
1d956cd
100644
(file)
--- a/
drivers/net/enic/enic_main.c
+++ b/
drivers/net/enic/enic_main.c
@@
-368,6
+368,7
@@
enic_alloc_consistent(void *priv, size_t size,
pr_err("%s : Failed to allocate memory for memzone list\n",
__func__);
rte_memzone_free(rz);
+ return NULL;
}
mze->rz = rz;