浏览代码

asus_acpi: fix possible double free (found by Coverity)

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Jesper Juhl 18 年之前
父节点
当前提交
de47b69c7b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/acpi/asus_acpi.c

+ 1 - 0
drivers/acpi/asus_acpi.c

@@ -1192,6 +1192,7 @@ static int asus_hotk_get_info(void)
 			break;
 		default:
 			kfree(model);
+			model = NULL;
 			break;
 		}
 	}