check _malloc return value in rtl8712
PATCH 1/1 check _malloc return value in rtl8712
Description: The original check is wrong.
Signed-off-by Xiaochen Wang <[email protected]>
--- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1 -1
@@ -953,7 +953,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);
Signature · 1 line
1.7.2.3
Quoted 12 lines · Xiaochen Wang
Description: The original check is wrong.
Signed-off-by Xiaochen Wang<[email protected]>--- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/staging/rtl8712/rtl871x_ioctl_linux.c +0
-0
drivers/staging/rtl8712/rtl871x_ioctl_linux.c static int r871x_wx_set_priv(struct net_device *dev, · line 959
Quoted 8 lines
drivers/staging/rtl8712/rtl871x_ioctl_linux.c +1
-1@@ -953,7 +953,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);
ACK.
Larry