• R
    params: cleanup sysfs allocation · 18eb74fa
    Rusty Russell 提交于
    commit 63662139 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: NRusty Russell <rusty@rustcorp.com.au>
    18eb74fa
params.c 22.3 KB