drivers/staging/wlan-ng/p80211conv.c: fixed a potential memory leak
authorLynn Lei <lynnl.yet@gmail.com>
Tue, 8 Aug 2017 15:05:59 +0000 (23:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Aug 2017 22:57:17 +0000 (15:57 -0700)
commitb5956dd26f848086af7413d8d089b4ab41ab341d
tree7163fdc3600998d21fd7ed24271dd3039227bff0
parent33ebca0d0538eec224e1fba378f01d5225740f2f
drivers/staging/wlan-ng/p80211conv.c: fixed a potential memory leak

Fixed a potential memory leak inside skb_ether_to_p80211()
When the wep_encrypt() fails  the code return 2 directly
Which causes the p80211_wep->data dangling

Add a kfree statement to reclaim that memory allocated

Signed-off-by: Lynn Lei <lynnl.yet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/p80211conv.c