提交 61698b7e 编写于 作者: C Christian Engelmayer 提交者: John W. Linville

rsi: Fix a potential memory leak in rsi_send_auto_rate_request()

Fix a potential memory leak in the error path of function
rsi_send_auto_rate_request(). In case memory allocation for array
'selected_rates' fails, the error path exits and leaves the previously
allocated skb in place. Detected by Coverity: CID 1195575.
Signed-off-by: NChristian Engelmayer <cengelma@gmx.at>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 2004daba
......@@ -966,6 +966,7 @@ static int rsi_send_auto_rate_request(struct rsi_common *common)
if (!selected_rates) {
rsi_dbg(ERR_ZONE, "%s: Failed in allocation of mem\n",
__func__);
dev_kfree_skb(skb);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册