raw/ioat: fix memory leak in device configure
authorKevin Laatz <kevin.laatz@intel.com>
Thu, 17 Jun 2021 14:17:52 +0000 (14:17 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 22 Jun 2021 20:58:15 +0000 (22:58 +0200)
commit6ce4f3d0d7453012df836e312b82cc00d4fb9682
tree2a97c528974c9516f24d2485197fed36142f3456
parent8050b61562723c531ad9d4736f5549050eba190e
raw/ioat: fix memory leak in device configure

During device configure, memory is allocated for "hdl_ring_flags". In the
event of another call to the device configure function (reconfigure), a
memory leak would occur. This patch fixes the memory leak by free'ing the
memory before reallocating it.

Fixes: 245efe544d8e ("raw/ioat: report status of completed jobs")
Cc: stable@dpdk.org
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/raw/ioat/ioat_common.c