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

Commit 3c626024 authored by Jiri Kosina's avatar Jiri Kosina
Browse files

HID: i2c-hid: fix memory leak during probe



In case we are returning from i2c_hid_probe() through the 'err' or
'err_mem_free' labels, there is noone freeing the buffers allocated by
i2c_hid_alloc_buffers().

Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 4a200c3b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -892,6 +892,7 @@ err:
	if (ihid->irq)
		free_irq(ihid->irq, ihid);

	i2c_hid_free_buffers(ihid);
	kfree(ihid);
	return ret;
}