mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 16:49:22 +00:00
staging: rtl8712: check _malloc return value
Description: The original check is wrong. Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
cd92274093
commit
4495c15f29
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue