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

Commit 93050db2 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Input: ALPS - fix memory leak when detection fails



This fixes memory leak introduced by commit
a09221e8

Acked-by: default avatarPali Rohár <pali.rohar@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 4a6155a4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2605,8 +2605,10 @@ int alps_detect(struct psmouse *psmouse, bool set_properties)
		return -ENOMEM;

	error = alps_identify(psmouse, priv);
	if (error)
	if (error) {
		kfree(priv);
		return error;
	}

	if (set_properties) {
		psmouse->vendor = "ALPS";