From: Chengwen Feng Date: Fri, 30 Apr 2021 09:34:38 +0000 (+0800) Subject: eventdev: fix memory leakage on thread creation failure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f6681ab76bc5983f0571aaa4154ef839978c1088;p=dpdk.git 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 --- 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;