security: fix crash on destroy null session
authorRadu Nicolau <radu.nicolau@intel.com>
Thu, 5 Jul 2018 10:04:42 +0000 (11:04 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 10 Jul 2018 22:57:51 +0000 (00:57 +0200)
commit8a29f519ef1b2fdddb0324e867006c76c70173cb
treedb2efcd8bb8ac921758230cb151a967a3be33a9b
parentb063e843fa03c6af076ae9f5bce73e97211d8989
security: fix crash on destroy null session

rte_security_session_destroy should return -EINVAL if session is NULL,
but segfaults because of rte_mempool_from_obj(NULL) call.

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
lib/librte_security/rte_security.c