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:
Fenglin Wu <fenglinw@codeaurora.org>
Loading
Please register or sign in to comment