]> git.baikalelectronics.ru Git - kernel.git/commit
rsi: Fix a potential memory leak in rsi_set_channel()
authorChristian Engelmayer <cengelma@gmx.at>
Wed, 9 Apr 2014 19:28:54 +0000 (21:28 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Apr 2014 18:31:41 +0000 (14:31 -0400)
commitc177f8c0bd7ae6e471ce1f7507b0779a97eaaecf
tree0efecf018f2d0313d2a2adb665defdc008c2c03a
parent7b8772b71d27cd270513be36e70b0115b7975813
rsi: Fix a potential memory leak in rsi_set_channel()

Fix a potential memory leak in function rsi_set_channel() that is used to
program channel changes. The channel check block for the frequency bands
directly exits the function in case of an error, thus leaving an already
allocated skb unreferenced. Move the checks above allocating the skb.
Detected by Coverity: CID 1195576.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rsi/rsi_91x_mgmt.c