Skip to content
Commit 22fd2a8a authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman
Browse files

greybus: bundle: use kstrdup() for state file



The kernfs code guarantees we'll get a NUL-terminated buffer.
Use kstrdup() rather than kzalloc() + memcpy() in state_store()
making it slightly clearer what we're doing.  This has the added
benefit of guaranteeing that the stored string has no NUL character
inside it.

Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 55b930cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment