Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51c94491 authored by Maxim Mikityanskiy's avatar Maxim Mikityanskiy Committed by Matthew Garrett
Browse files

msi-wmi: Fix memory leak



Fix memory leak - don't forget to kfree ACPI object when returning from
msi_wmi_notify() after suppressing key event.

Signed-off-by: default avatarMaxim Mikityanskiy <maxtram95@gmail.com>
Acked-by: default avatarAnisse Astier <anisse@astier.eu>
Signed-off-by: default avatarLee, Chun-Yi <jlee@suse.com>
Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
parent 03696e51
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ static void msi_wmi_notify(u32 value, void *context)
				pr_debug("Suppressed key event 0x%X - "
					 "Last press was %lld us ago\n",
					 key->code, ktime_to_us(diff));
				return;
				goto msi_wmi_notify_exit;
			}
			last_pressed[key->code - SCANCODE_BASE] = cur;

@@ -195,6 +195,8 @@ static void msi_wmi_notify(u32 value, void *context)
			pr_info("Unknown key pressed - %x\n", eventcode);
	} else
		pr_info("Unknown event received\n");

msi_wmi_notify_exit:
	kfree(response.pointer);
}