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

Skip to content
Commit ecc683a9 authored by Fenglin Wu's avatar Fenglin Wu
Browse files

input: qti-haptics: ensure valid pointer when calling kfree



In haptics pattern/brake debugfs file write operation functions,
strsep() is used iteratively to split the user-passed string into
tokens for setting parameters. However, strsep() modifies the pointer
passed and hence the same pointer cannot be used in kfree(). Fix this
by copying the pointer originally allocated by kmalloc() and use it
in kfree() as well. While at it, change kmalloc() to kzalloc().

Change-Id: I5a4c08db32683dfe5e4fefbce146fee1ac6cb88b
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent b6b527b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment