net/ena: check pointer before memset
authorRafal Kozik <rk@semihalf.com>
Thu, 7 Jun 2018 09:43:18 +0000 (11:43 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 14 Jun 2018 17:27:50 +0000 (19:27 +0200)
commit46916aa17d4b2007df8c0454f99ba0ca8b8cb93b
treedcc164ea321ef732afb2ed413eaeba57e9e5c9a8
parentba82e010df880467418b9bffe20275a394af414e
net/ena: check pointer before memset

Need to check if memory allocation succeed before using it.
Using memset on NULL pointer cause segfault.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
Cc: stable@dpdk.org
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
drivers/net/ena/base/ena_plat_dpdk.h