]> git.baikalelectronics.ru Git - kernel.git/commit
usbnet: fix memory leak in error case
authorOliver Neukum <oneukum@suse.com>
Tue, 5 Jul 2022 12:53:51 +0000 (14:53 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jul 2022 01:54:56 +0000 (18:54 -0700)
commit46dfe5cf10060d38fd378fb65f2b63249461a428
tree8b7573a726524c9cb4289a9a1e6fe1482e54c928
parentdac93e413ffa6fdb0b1e7b4e022bef127a7bf659
usbnet: fix memory leak in error case

usbnet_write_cmd_async() mixed up which buffers
need to be freed in which error case.

v2: add Fixes tag
v3: fix uninitialized buf pointer

Fixes: f950829cdcc42 ("usbnet: introduce usbnet 3 command helpers")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20220705125351.17309-1-oneukum@suse.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/usbnet.c