firmware: add missing kfree for work on async call
PATCH 1/1 firmware: add missing kfree for work on async call
From: "Luis R. Rodriguez" <[email protected]>
The recent fix to use kstrdup_const() failed to add a kfree upon failure of name allocation...
Cc Ming Lei <[email protected]>
Cc Seth Forshee <[email protected]>
Cc Kyle McMartin <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Signed-off-by Luis R. Rodriguez <[email protected]>
---
Sorry about that..
drivers/base/firmware_class.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/base/firmware_class.c +3 -1
@@ -1307,8 +1307,10 @@ request_firmware_nowait( fw_work->module = module; fw_work->name =kstrdup_const (name, gfp); -if (!fw_work->name) +if (!fw_work->name) { +kfree (fw_work);return -ENOMEM ; + } fw_work->device = device; fw_work->context = context; fw_work->cont = cont;
Signature · 1 line
2.3.2.209.gd67f9d5.dirty