No need to check for NULL pointer before calling these functions
Found by cocci/nullfree.cocci.

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 app/test/test_cryptodev_asym.c  | 3 +--
 app/test/test_reassembly_perf.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 0ef2642fdd2b..c43a063b8262 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -565,8 +565,7 @@ ut_teardown_asym(void)
 
        if (self->sess != NULL)
                rte_cryptodev_asym_session_free(dev_id, self->sess);
-       if (self->op != NULL)
-               rte_crypto_op_free(self->op);
+       rte_crypto_op_free(self->op);
        self->sess = NULL;
        self->op = NULL;
        self->result_op = NULL;
diff --git a/app/test/test_reassembly_perf.c b/app/test/test_reassembly_perf.c
index c11b65291fec..3af104b67348 100644
--- a/app/test/test_reassembly_perf.c
+++ b/app/test/test_reassembly_perf.c
@@ -81,8 +81,7 @@ reassembly_test_teardown(void)
        if (frag_tbl != NULL)
                rte_ip_frag_table_destroy(frag_tbl);
 
-       if (pkt_pool != NULL)
-               rte_mempool_free(pkt_pool);
+       rte_mempool_free(pkt_pool);
 }
 
 static void
-- 
2.39.2

Reply via email to