Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 lib/ipsec/ipsec_sad.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/ipsec/ipsec_sad.c b/lib/ipsec/ipsec_sad.c
index 531e1e323cdc..af4b1ce757d2 100644
--- a/lib/ipsec/ipsec_sad.c
+++ b/lib/ipsec/ipsec_sad.c
@@ -440,8 +440,7 @@ rte_ipsec_sad_destroy(struct rte_ipsec_sad *sad)
        rte_hash_free(sad->hash[RTE_IPSEC_SAD_SPI_DIP]);
        rte_hash_free(sad->hash[RTE_IPSEC_SAD_SPI_DIP_SIP]);
        rte_free(sad);
-       if (te != NULL)
-               rte_free(te);
+       rte_free(te);
 }
 
 /*
-- 
2.30.2

Reply via email to