mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
19 lines
631 B
Diff
19 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;
|