Skip to content

Commit

Permalink
staging: rtl8187se: check kmalloc return value
Browse files Browse the repository at this point in the history
check kmalloc return value

Signed-off-by: Xiaochen Wang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
chobits authored and gregkh committed Mar 7, 2011
1 parent 9025c0f commit 0875abf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 0875abf

Please sign in to comment.