From f493119397d0f5dbe33f67697ff09aa646e5f17c Mon Sep 17 00:00:00 2001 From: Chaitanya Babu Talluri Date: Wed, 14 Nov 2018 11:24:06 +0000 Subject: [PATCH] efd: fix write unlock during ring creation In rte_efd_create() write lock has already been unlocked before ring creation itself. So second unlock after the ring creation has been removed. Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") Cc: stable@dpdk.org Signed-off-by: Chaitanya Babu Talluri Acked-by: Reshma Pattan Reviewed-by: Ferruh Yigit --- lib/librte_efd/rte_efd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c index a780e2fe83..e6e5cfda22 100644 --- a/lib/librte_efd/rte_efd.c +++ b/lib/librte_efd/rte_efd.c @@ -692,7 +692,8 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, offline_cpu_socket, 0); if (r == NULL) { RTE_LOG(ERR, EFD, "memory allocation failed\n"); - goto error_unlock_exit; + rte_efd_free(table); + return NULL; } /* Populate free slots ring. Entry zero is reserved for key misses. */ -- 2.20.1