From af544588e07e4f6a0b1706baba8888038d8e4afa Mon Sep 17 00:00:00 2001 From: Zach Dworkin Date: Thu, 20 Feb 2025 09:43:57 -0800 Subject: [PATCH] prov/efa: Set g_device_list to NULL on free fi_info has a double free issue. The efa g_device_list isn't being set to NULL after being freed so the next time efa_device_list_finalize is called it will be freed again (double free). Setting it to NULL removes this. Signed-off-by: Zach Dworkin --- prov/efa/src/efa_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/prov/efa/src/efa_device.c b/prov/efa/src/efa_device.c index eef5a3008ac..f61211ba387 100644 --- a/prov/efa/src/efa_device.c +++ b/prov/efa/src/efa_device.c @@ -230,6 +230,7 @@ void efa_device_list_finalize(void) efa_device_destruct(&g_device_list[i]); free(g_device_list); + g_device_list = NULL; } g_device_cnt = 0;