提交 4495c15f 编写于 作者: X Xiaochen Wang 提交者: Greg Kroah-Hartman

staging: rtl8712: check _malloc return value

Description: The original check is wrong.
Signed-off-by: NXiaochen Wang <wangxiaochen0@gmail.com>
Acked-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 cd922740
......@@ -958,7 +958,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
len = dwrq->length;
ext = _malloc(len);
if (!_malloc(len))
if (!ext)
return -ENOMEM;
if (copy_from_user(ext, dwrq->pointer, len)) {
kfree(ext);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册