From: Yunjian Wang Date: Wed, 21 Oct 2020 11:19:03 +0000 (+0800) Subject: eal: fix leak on device event callback unregister X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c78bd27d4b74a74261b180cb8d5421b919c1ab9a;p=dpdk.git eal: fix leak on device event callback unregister The event_cb->dev_name is not freed when freeing event_cb, and this causes a memory leak. Fixes: a753e53d517b ("eal: add device event monitor framework") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Jeff Guo Acked-by: David Marchand --- diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index 9e4f09d83e..363a2ca95e 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -526,6 +526,7 @@ rte_dev_event_callback_unregister(const char *device_name, */ if (event_cb->active == 0) { TAILQ_REMOVE(&dev_event_cbs, event_cb, next); + free(event_cb->dev_name); free(event_cb); ret++; } else {