diff options
author | Ziyang Xuan <william.xuanziyang@huawei.com> | 2022-11-11 08:09:23 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-14 11:55:43 +0100 |
commit | e4041be97b15302ebfffda8bbd45f3b2d096048f (patch) | |
tree | 22664a5fac90072918491f34be979ed57fd13f89 /drivers/net/usb/ax88179_178a.c | |
parent | octeon_ep: ensure octep_get_link_status() successfully before octep_link_up() (diff) | |
download | linux-e4041be97b15302ebfffda8bbd45f3b2d096048f.tar.xz linux-e4041be97b15302ebfffda8bbd45f3b2d096048f.zip |
octeon_ep: fix potential memory leak in octep_device_setup()
When occur unsupported_dev and mbox init errors, it did not free oct->conf
and iounmap() oct->mmio[i].hw_addr. That would trigger memory leak problem.
Add kfree() for oct->conf and iounmap() for oct->mmio[i].hw_addr under
unsupported_dev and mbox init errors to fix the problem.
Fixes: 862cd659a6fb ("octeon_ep: Add driver framework and device initialization")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/ax88179_178a.c')
0 files changed, 0 insertions, 0 deletions