[PATCH 06/16] platform/x86: wmi: Fix error handling when creating devices

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We have two memory leaks. If guid_already_parsed returned true, we leak the wmi_block. If wmi_create_device failed, we leak the device. Simplify the logic and fix both of them. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski

[PATCH 06/16] platform/x86: wmi: Fix error handling when creating devices

2017-05-26 Thread Darren Hart
From: Andy Lutomirski We have two memory leaks. If guid_already_parsed returned true, we leak the wmi_block. If wmi_create_device failed, we leak the device. Simplify the logic and fix both of them. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Mario Limonciello Cc: Pali Rohár Cc: