crypto/caam_jr: fix memory leak and illegal access
authorGagandeep Singh <g.singh@nxp.com>
Tue, 9 Apr 2019 06:18:38 +0000 (06:18 +0000)
committerAkhil Goyal <akhil.goyal@nxp.com>
Thu, 18 Apr 2019 14:01:28 +0000 (16:01 +0200)
commitc761bffe0bb35529e76ec7b13e21af39e87b6424
treee1102911341a10805a1a5decb3406b7a9cc0eb1a
parent3386ca38bdc4c835489ed088e2ea0843e90dc5b6
crypto/caam_jr: fix memory leak and illegal access

Opendir() returns allocated storage which must be freed at the
end of function or in case any return on error. so freeing the
allocation using closedir in an error case.

Coverity issue: 323507
Coverity issue: 325880
Fixes: e7a45f3cc245 ("crypto/caam_jr: add UIO specific operations")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
drivers/crypto/caam_jr/caam_jr_uio.c