nixpkgs/pkgs/os-specific/linux/odp-dpdk/odp_crypto.patch

19 lines
631 B
Diff
Raw Normal View History

2017-09-08 01:56:13 +01:00
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;