aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_security
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_security')
-rw-r--r--lib/librte_security/rte_security.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index 685729f4..503f5b53 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -84,7 +84,6 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
struct rte_security_session *sess)
{
int ret;
- struct rte_mempool *mp = rte_mempool_from_obj(sess);
RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_destroy, -ENOTSUP);
@@ -93,7 +92,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
ret = instance->ops->session_destroy(instance->device, sess);
if (!ret)
- rte_mempool_put(mp, (void *)sess);
+ rte_mempool_put(rte_mempool_from_obj(sess), (void *)sess);
return ret;
}