Commit 69b2186c authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[PATCH] firmware/efivars: handle error

Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
Acked-by: default avatarMatt Domsch <Matt_Domsch@dell.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 42ddfd68
......@@ -639,7 +639,12 @@ efivar_create_sysfs_entry(unsigned long variable_name_size,
kobject_set_name(&new_efivar->kobj, "%s", short_name);
kobj_set_kset_s(new_efivar, vars_subsys);
kobject_register(&new_efivar->kobj);
i = kobject_register(&new_efivar->kobj);
if (i) {
kfree(short_name);
kfree(new_efivar);
return 1;
}
kfree(short_name);
short_name = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment