dect
/
linux-2.6
Archived
13
0
Fork 0

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:
Xiaochen Wang 2011-03-04 13:09:00 +08:00 committed by Greg Kroah-Hartman
parent 9025c0faee
commit 0875abf83d
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}
}