cryptodev: fix uninitialized session clear
authorMarko Kovacevic <marko.kovacevic@intel.com>
Mon, 15 Apr 2019 15:04:49 +0000 (16:04 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Thu, 18 Apr 2019 14:01:28 +0000 (16:01 +0200)
commiteb1940c84de0d902bca36f311e09ab1024ed60c1
tree1a2a99d65f5964260483ec999adb2fae1695ad11
parent083a277754f664d6f5d3af166f1f45ae0cb32cc3
cryptodev: fix uninitialized session clear

added check to see if a session for a device
has been initialised if it has return 0.

Fixes: 5d6c73dd5938 ("cryptodev: add reference count to session private data")
Cc: stable@dpdk.org
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
lib/librte_cryptodev/rte_cryptodev.c