Skip to content

Commit

Permalink
x86: asus-laptop: fix invalid point access
Browse files Browse the repository at this point in the history
asus->name is null or point to const string,so it is not suitable to kfree it.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
  • Loading branch information
Libo Chen authored and Matthew Garrett committed Jul 10, 2013
1 parent 4c241b3 commit 38bdd72
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/platform/x86/asus-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,6 @@ static int asus_acpi_add(struct acpi_device *device)
fail_backlight:
asus_platform_exit(asus);
fail_platform:
kfree(asus->name);
kfree(asus);

return result;
Expand Down

0 comments on commit 38bdd72

Please sign in to comment.