test/cryptodev: remove unnecessary null check before free
Checks
Commit Message
Found by devtools/cocci/nullfree.cocci
Fixes: 2d970c663314 ("cryptodev: add asymmetric SM2 algorithm")
Cc: gmuthukrishn@marvell.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_cryptodev_asym.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Acked-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
> Found by devtools/cocci/nullfree.cocci
>
> Fixes: 2d970c663314 ("cryptodev: add asymmetric SM2 algorithm")
> Cc: gmuthukrishn@marvell.com
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Applied to dpdk-next-crypto
Thanks.
@@ -2654,8 +2654,7 @@ _test_sm2_enc(bool rnd_secret)
}
}
exit:
- if (pbuf != NULL)
- rte_free(pbuf);
+ rte_free(pbuf);
if (sess != NULL)
rte_cryptodev_asym_session_free(dev_id, sess);