]> 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)
commitefdfd2f59e6a8e9e023800e210df0afd55d6d9f3
tree0efecf018f2d0313d2a2adb665defdc008c2c03a
parent5a65c1d9fc3079ce63d7a345924609f5f93e4169
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