wifi: fix double free during FW loading

The commit that added firmware loading via the VFS (see )
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 .
This commit is contained in:
Josef Söntgen 2024-08-08 15:37:46 +02:00 committed by Christian Helmuth
parent 572d406d66
commit 2b3a2b875b

@ -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);
}