Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86d68a58 authored by Dan Carpenter's avatar Dan Carpenter Committed by Matt Fleming
Browse files

efi: Small leak on error in runtime map code



The "> 0" here should ">= 0" so we free map_entries[0].

Fixes: 926172d4 ('efi: Export EFI runtime memory mapping to sysfs')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarDave Young <dyoung@redhat.com>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
parent 822a0279
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}