Commit-ID: 86d68a58d00db3770735b5919ef2c6b12d7f06f3 Gitweb: http://git.kernel.org/tip/86d68a58d00db3770735b5919ef2c6b12d7f06f3 Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx> AuthorDate: Thu, 15 Jan 2015 12:21:21 +0300 Committer: Matt Fleming <matt.fleming@xxxxxxxxx> CommitDate: Tue, 20 Jan 2015 15:50:25 +0000 efi: Small leak on error in runtime map code The "> 0" here should ">= 0" so we free map_entries[0]. Fixes: 926172d46038 ('efi: Export EFI runtime memory mapping to sysfs') Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Acked-by: Dave Young <dyoung@xxxxxxxxxx> Signed-off-by: Matt Fleming <matt.fleming@xxxxxxxxx> --- drivers/firmware/efi/runtime-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/runtime-map.c b/drivers/firmware/efi/runtime-map.c index 018c29a..87b8e3b 100644 --- a/drivers/firmware/efi/runtime-map.c +++ b/drivers/firmware/efi/runtime-map.c @@ -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); } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |