]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drivers/leds/led-triggers.c: fix memory leak
authorMasakazu Mokuno <Masakazu.Mokuno@jp.sony.com>
Wed, 5 Oct 2011 00:43:33 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Oct 2011 06:06:55 +0000 (17:06 +1100)
commit79641f936e2f49e253c1cbfe6ec2585bc9321458
tree5cb0cf1ce2760279bf6041069c79c1dc38190d76
parentd7336cbdecba20b2a939312cfb3fb6e5c67cbf89
drivers/leds/led-triggers.c: fix memory leak

The memory for struct led_trigger should be kfreed in the
led_trigger_register() error path.  Also this function should return NULL
on error.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/leds/led-triggers.c