]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: fix a possible NULL pointer dereference
authorGabor Juhos <juhosg@openwrt.org>
Thu, 16 Feb 2012 19:44:59 +0000 (20:44 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 21 Feb 2012 19:45:25 +0000 (14:45 -0500)
commit5a14f4b279e809ae6e656804d9c737d10ce40218
tree676e36864819d29b505a4c4157c6a913172c5f90
parent1b7c01d04e55e95da9eed8074807978121429bba
rt2x00: fix a possible NULL pointer dereference

The 'rt2x00lib_probe_dev' function tries to
allocate the workqueue. If the allocation
fails, 'rt2x00_lib_remove_dev' is called on
the error path. Because 'rt2x00dev->workqueue'
is NULL in this case, the 'destroy_workqueue'
call will cause a NULL pointer dereference.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c