From 2b3a2b875b4246ee425541bf7c635b88eb969111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 8 Aug 2024 15:37:46 +0200 Subject: [PATCH] wifi: fix double free during FW loading The commit that added firmware loading via the VFS (see #4861) introduces a double-free bug where the memory that contains the image is freed twice, once from the callback and once from the work function. As alle examined drivers call 'release_firmware' from the callback function themselves, remove the erroneous 'kfree' call from the work function. Issue #5264. --- repos/dde_linux/src/lib/wifi/lx_emul.c | 1 - 1 file changed, 1 deletion(-) diff --git a/repos/dde_linux/src/lib/wifi/lx_emul.c b/repos/dde_linux/src/lib/wifi/lx_emul.c index d35ad4771e..4195004a92 100644 --- a/repos/dde_linux/src/lib/wifi/lx_emul.c +++ b/repos/dde_linux/src/lib/wifi/lx_emul.c @@ -143,7 +143,6 @@ static void request_firmware_work_func(struct work_struct *work) fw_work->cont(fw, fw_work->context); kfree(fw_work); - kfree(fw); }