[2/2] test/ipsec: fix destroy sa function

Message ID 1561728562-11213-3-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series test/ipsec: fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Iremonger, Bernard June 28, 2019, 1:29 p.m. UTC
  Call rte_cryptodev_sym_session_clear() function.

Cc: stable@dpdk.org
Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test/test_ipsec.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 2328342..ea558fd 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -1170,9 +1170,11 @@  static void
 destroy_sa(uint32_t j)
 {
 	struct ipsec_unitest_params *ut = &unittest_params;
+	struct ipsec_testsuite_params *ts = &testsuite_params;
 
 	rte_ipsec_sa_fini(ut->ss[j].sa);
 	rte_free(ut->ss[j].sa);
+	rte_cryptodev_sym_session_clear(ts->valid_dev, ut->ss[j].crypto.ses);
 	rte_cryptodev_sym_session_free(ut->ss[j].crypto.ses);
 	memset(&ut->ss[j], 0, sizeof(ut->ss[j]));
 }