net/ice/base: fix memory leak on error path
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 15 Jun 2020 02:04:59 +0000 (10:04 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jun 2020 17:21:08 +0000 (19:21 +0200)
commitbe45049b3c4340499dad5648f455f7b443975671
tree123a95013a25ff1821a7a9172378d9d0bdf56d1c
parent064109fd2ddd55bf2176681451c73327037d392e
net/ice/base: fix memory leak on error path

Handles memory leaks during control queue initialization and
buffer allocation failures. The MACRO - ICE_FREE_CQ_BUFS is modified to
re-use for this fix.

Fixes: 6c1f26be50a2 ("net/ice/base: add control queue information")
Cc: stable@dpdk.org
Signed-off-by: Surabhi Boob <surabhi.boob@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_controlq.c