net/enic: fix possible null pointer dereference
authorRongQiang Xie <xie.rongqiang@zte.com.cn>
Wed, 23 Aug 2017 08:49:24 +0000 (16:49 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:47 +0000 (02:49 +0200)
commit7f4a1aa1430d085b80b6a483aac0e729a0b4f6df
tree123260ce7c94ef778a1247625bfcb625b351d0b3
parentc7714992092f86929d0aab555d68a24c536689dc
net/enic: fix possible null pointer dereference

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