]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: myri10ge: fix memory leaks
authorWenwen Wang <wenwen@cs.uga.edu>
Wed, 14 Aug 2019 06:38:39 +0000 (01:38 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 26 Sep 2019 04:34:52 +0000 (00:34 -0400)
commit948f0f19b1c586f63618029596cadd9cc05199e6
treefb2c228905a2ed42988e3ff6bf5acdd07fcc1583
parent88e989455e5dec428d98c96c8e27972f6835f94a
net: myri10ge: fix memory leaks

BugLink: https://bugs.launchpad.net/bugs/1843463
[ Upstream commit 20fb7c7a39b5c719e2e619673b5f5729ee7d2306 ]

In myri10ge_probe(), myri10ge_alloc_slices() is invoked to allocate slices
related structures. Later on, myri10ge_request_irq() is used to get an irq.
However, if this process fails, the allocated slices related structures are
not deallocated, leading to memory leaks. To fix this issue, revise the
target label of the goto statement to 'abort_with_slices'.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/myricom/myri10ge/myri10ge.c