]> git.baikalelectronics.ru Git - kernel.git/commit
net: kalmia: fix memory leaks
authorWenwen Wang <wenwen@cs.uga.edu>
Wed, 14 Aug 2019 18:56:43 +0000 (13:56 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Aug 2019 20:03:21 +0000 (13:03 -0700)
commit0f6b1e5409f26505c61471011b2557873807eb63
treee29a80bcb173a25a5f45ca91e8ab88b656de0a0a
parent03af0a5542ac11d4241a2971d9c0aa3b1ce98978
net: kalmia: fix memory leaks

In kalmia_init_and_get_ethernet_addr(), 'usb_buf' is allocated through
kmalloc(). In the following execution, if the 'status' returned by
kalmia_send_init_packet() is not 0, 'usb_buf' is not deallocated, leading
to memory leaks. To fix this issue, add the 'out' label to free 'usb_buf'.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/kalmia.c