Просмотр исходного кода

x86: asus-laptop: fix invalid point access

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>
Libo Chen 12 лет назад
Родитель
Сommit
38bdd729ca
1 измененных файлов с 0 добавлено и 1 удалено
  1. 0 1
      drivers/platform/x86/asus-laptop.c

+ 0 - 1
drivers/platform/x86/asus-laptop.c

@@ -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;