]> git.baikalelectronics.ru Git - kernel.git/commit
sx.c: avoid referencing freed memory if copy_from_user() fails
authorDan Carpenter <error27@gmail.com>
Fri, 20 Feb 2009 23:38:46 +0000 (15:38 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 Feb 2009 01:57:49 +0000 (17:57 -0800)
commit5f585d937b5abcd0343b8978574f68e171323946
treeee886216933e5578dcf9d034a166f183fdf67cc3
parentf8111d05278c2ff3a767b9779f8a13265980fe14
sx.c: avoid referencing freed memory if copy_from_user() fails

The "break" would just result in reusing a free'd pointer.  I don't have
the cards myself to test it though.  :/

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/sx.c