Found by devtools/cocci/nullfree.cocci

Fixes: 2d970c663314 ("cryptodev: add asymmetric SM2 algorithm")
Cc: gmuthukri...@marvell.com
Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 app/test/test_cryptodev_asym.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 15a1f3d6385e..391d122f530d 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -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);
-- 
2.39.2

Reply via email to