mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
efi: Small leak on error in runtime map code
The "> 0" here should ">= 0" so we free map_entries[0].
Fixes: 926172d460
('efi: Export EFI runtime memory mapping to sysfs')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
This commit is contained in:
parent
822a027928
commit
86d68a58d0
@ -191,7 +191,7 @@ int __init efi_runtime_map_init(struct kobject *efi_kobj)
|
||||
|
||||
return 0;
|
||||
out_add_entry:
|
||||
for (j = i - 1; j > 0; j--) {
|
||||
for (j = i - 1; j >= 0; j--) {
|
||||
entry = *(map_entries + j);
|
||||
kobject_put(&entry->kobj);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user