diff options
author | Christopher Brannon <chris@the-brannons.com> | 2010-12-19 22:50:24 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-20 15:58:16 -0800 |
commit | 628f34282db49359576dcb8cbaea65b4bf083ebd (patch) | |
tree | 4b80a2249066e299f3e05a8cb142fc6563969be5 /block/scsi_ioctl.c | |
parent | 0bbfc0edb7a2606829dfcb5c6926f20adfc68d91 (diff) |
staging: speakup: more fixes for init-failure handling.
We still leaked many resources when Speakup failed to initialize.
Examples of leaked resources include:
/dev/synth, keyboard or VT notifiers, and heap-allocated st_spk_t
structs.
This is fixed.
* We now use PTR_ERR to detect kthread_create failure
(thank you Dan Carpenter).
* The loop which frees members of the speakup_console array now iterates
over the whole array, not stopping at the first NULL value. Fixes
a possible memory leak. Safe because kfree(NULL) is a no-op.
* The order of some initializations was changed. The safe ones, which
will never fail, are performed first.
Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'block/scsi_ioctl.c')
0 files changed, 0 insertions, 0 deletions