mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
staging: ks7010: fix two memory leaks on error return path
On the error case where there is an invalid MAC address there is memory leak on packet and pp on the error return. Free these first before returning to fix the leak. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8defffb208
commit
aeaf5d86fa
1 changed files with 2 additions and 0 deletions
|
@ -1196,6 +1196,8 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
|
|||
DPRINTK(1, "ethernet->h_source=%02X:%02X:%02X:%02X:%02X:%02X\n",
|
||||
eth->h_source[0], eth->h_source[1], eth->h_source[2],
|
||||
eth->h_source[3], eth->h_source[4], eth->h_source[5]);
|
||||
dev_kfree_skb(packet);
|
||||
kfree(pp);
|
||||
return -3;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue