Skip to content

Commit

Permalink
SFI: do not return freed pointer
Browse files Browse the repository at this point in the history
We never actually use the return value of sfi_sysfs_install_table() but
it still seems wrong to return a freed pointer.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Dan Carpenter authored and Len Brown committed Jun 1, 2010
1 parent 67a3e12 commit e29df91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/sfi/sfi_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,10 @@ struct sfi_table_attr __init *sfi_sysfs_install_table(u64 pa)

ret = sysfs_create_bin_file(tables_kobj,
&tbl_attr->attr);
if (ret)
if (ret) {
kfree(tbl_attr);
tbl_attr = NULL;
}

sfi_unmap_table(th);
return tbl_attr;
Expand Down

0 comments on commit e29df91

Please sign in to comment.