raw/ifpga: fix memory leak
authorAndy Pei <andy.pei@intel.com>
Fri, 18 Jan 2019 11:14:33 +0000 (11:14 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 18 Jan 2019 23:07:52 +0000 (00:07 +0100)
commit3c69149a21be9f21da4d36bcf851762d81e873c1
treee18ad124304e911c6ed92ecb1f681ff42c9937d0
parentfb87e55abac808bdda60e114a6817ab6e812ec16
raw/ifpga: fix memory leak

When ifpga_rawdev_create() allocate memory for a new rawdev,
the original code allocate redundant memory for adapter,
which is a member of the rawdev. What is actually necessary is
the adapter to be initialized, not memory allocated.

Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
drivers/raw/ifpga_rawdev/base/opae_hw_api.c
drivers/raw/ifpga_rawdev/base/opae_hw_api.h
drivers/raw/ifpga_rawdev/ifpga_rawdev.c