examples/fips_validation: fix leak on failure
authorCiara Power <ciara.power@intel.com>
Fri, 30 Oct 2020 17:36:40 +0000 (17:36 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Sat, 31 Oct 2020 17:10:43 +0000 (18:10 +0100)
commitbda9ce3c9451bbc86d0b8097a716720aeee4ecb8
tree590f132001827735a4e2e5c867bb394938ea5af9
parentafda6b01164dc83f71a684b94c0c9d096281caad
examples/fips_validation: fix leak on failure

The wb_data variable went out of scope on failure in the
get_writeback_data function. This is now freed before returning -1.

Coverity issue: 363453
Fixes: 952e10cdad5e ("examples/fips_validation: support scatter gather list")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
examples/fips_validation/main.c