staging: slicoss: Fix possible reuse of freed memory in timer function

Do not call kfree() till timer function is finished.

[This was found using grep. Compiled tested only]

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
CC: Joe Perches <joe@perches.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Kirill Tkhai 2014-02-10 22:36:23 +04:00 committed by Greg Kroah-Hartman
parent aa6d5e4cde
commit 161737a619

View file

@ -2970,7 +2970,7 @@ static void slic_card_cleanup(struct sliccard *card)
{
if (card->loadtimerset) {
card->loadtimerset = 0;
del_timer(&card->loadtimer);
del_timer_sync(&card->loadtimer);
}
slic_debug_card_destroy(card);