From f6681ab76bc5983f0571aaa4154ef839978c1088 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 30 Apr 2021 17:34:38 +0800 Subject: [PATCH] eventdev: fix memory leakage on thread creation failure This patch fixes the issue that epoll_events memory is not released after the intr thread created fail. Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter") Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) Acked-by: Jerin Jacob --- lib/eventdev/rte_event_eth_rx_adapter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c index d317e89c1b..13dfb28401 100644 --- a/lib/eventdev/rte_event_eth_rx_adapter.c +++ b/lib/eventdev/rte_event_eth_rx_adapter.c @@ -1436,6 +1436,7 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter) return 0; RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d\n", err); + rte_free(rx_adapter->epoll_events); error: rte_ring_free(rx_adapter->intr_ring); rx_adapter->intr_ring = NULL; -- 2.20.1