staging: rtl8187se: check kmalloc return value
check kmalloc return value Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
9025c0faee
commit
0875abf83d
@ -1435,8 +1435,9 @@ static inline u16 auth_parse(struct sk_buff *skb, u8** challenge, int *chlen)
|
||||
|
||||
if(*(t++) == MFIE_TYPE_CHALLENGE){
|
||||
*chlen = *(t++);
|
||||
*challenge = kmalloc(*chlen, GFP_ATOMIC);
|
||||
memcpy(*challenge, t, *chlen);
|
||||
*challenge = kmemdup(t, *chlen, GFP_ATOMIC);
|
||||
if (!*challenge)
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user