1
0
Fork 0

firmware: fix wrong memory deallocation in fw_add_devm_name()

Device resource data allocated with devres_alloc() must be deallocated
by devres_free().

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
steinar/wifi_calib_4_9_kernel
Vladimir Zapolskiy 2015-07-29 23:26:28 +03:00 committed by Greg Kroah-Hartman
parent 223e8f01b0
commit a885de6715
1 changed files with 1 additions and 1 deletions

View File

@ -443,7 +443,7 @@ static int fw_add_devm_name(struct device *dev, const char *name)
return -ENOMEM;
fwn->name = kstrdup_const(name, GFP_KERNEL);
if (!fwn->name) {
kfree(fwn);
devres_free(fwn);
return -ENOMEM;
}