]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
qed: Add cleanup in qed_slowpath_start()
authorWenwen Wang <wenwen@cs.uga.edu>
Wed, 21 Aug 2019 04:46:36 +0000 (23:46 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 26 Sep 2019 04:34:52 +0000 (00:34 -0400)
commit19df21e5c4b69dfc6dcd5a030b5074bd52f396c8
tree1ab89d34800f8f14f90b6d113d373a072e622833
parent1b171549880f6d17ef925798550d39e3022ae8e0
qed: Add cleanup in qed_slowpath_start()

BugLink: https://bugs.launchpad.net/bugs/1845266
[ Upstream commit de0e4fd2f07ce3bbdb69dfb8d9426b7227451b69 ]

If qed_mcp_send_drv_version() fails, no cleanup is executed, leading to
memory leaks. To fix this issue, introduce the label 'err4' to perform the
cleanup work before returning the error.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Acked-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
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/qlogic/qed/qed_main.c