nixpkgs/pkgs/os-specific/linux/odp-dpdk/odp_crypto.patch
2017-09-08 18:33:39 -07:00

18 lines
631 B
Diff

diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
index d95b157805dc..d13ad5bbde95 100644
--- a/platform/linux-dpdk/odp_crypto.c
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -900,11 +900,12 @@ int odp_crypto_session_create(odp_crypto_session_param_t *param,
/* Setup session */
session = rte_cryptodev_sym_session_create(cdev_id, first_xform);
- if (session == NULL)
+ if (session == NULL) {
/* remove the crypto_session_entry_t */
memset(entry, 0, sizeof(*entry));
free_session(entry);
return -1;
+ }
entry->rte_session = (intptr_t)session;
entry->cipher_xform = cipher_xform;