module: fix memory leak when load fails after srcversion/version allocated
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 25 Sep 2009 06:32:58 +0000 (00:32 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 15:02:59 +0000 (00:32 +0930)
Normally the twisty paths of sysfs will free the attributes, but not if
we fail before we hook it into sysfs (which is the last thing we do in
load_module).

(This sysfs code is a turd, no doubt there are other issues lurking too).

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>

No differences found