mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
efi: remove "kfree(NULL)"
No need to free a NULL pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
This commit is contained in:
parent
85c90716aa
commit
7b2dd6d2c4
@ -419,10 +419,8 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var)
|
||||
|
||||
short_name = kzalloc(short_name_size, GFP_KERNEL);
|
||||
|
||||
if (!short_name) {
|
||||
kfree(short_name);
|
||||
if (!short_name)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Convert Unicode to normal chars (assume top bits are 0),
|
||||
ala UTF-8 */
|
||||
|
Loading…
Reference in New Issue
Block a user