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

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

input: qcom-hv-haptics: ensure valid pointer when calling kfree



In haptics pattern/fifo/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 kzalloc() and use it in
kfree() as well.

Change-Id: I2baf8db4f7c39e7ab0a83411717e46a29a2e849b
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent a9eb6ca4
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