summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2014-11-10 09:32:29 +1030
committerRusty Russell <rusty@rustcorp.com.au>2014-11-11 17:07:47 +1030
commit18eb74fa94161380c1acc9cf562cb835c4e54a25 (patch)
tree33434c7ac01b5dc7b9a8fc7cd4a02981fe2de93a /include
parent6da0b565150b32318757062bc75834113f0508d6 (diff)
downloadlinux-18eb74fa94161380c1acc9cf562cb835c4e54a25.tar.bz2
params: cleanup sysfs allocation
commit 63662139e519ce06090b2759cf4a1d291b9cc0e2 attempted to patch a leak (which would only happen on OOM, ie. never), but it didn't quite work. This rewrites the code to be as simple as possible. add_sysfs_param() adds a parameter. If it fails, it's the caller's responsibility to clean up the parameters which already exist. The kzalloc-then-always-krealloc pattern is perhaps overly simplistic, but this code has clearly confused people. It worked on me... Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions