提交 86d68a58 编写于 作者: D Dan Carpenter 提交者: Matt Fleming

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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NDave Young <dyoung@redhat.com>
Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
上级 822a0279
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册