Skip to content
Commit 73e1b27b authored by Jianglei Nie's avatar Jianglei Nie Committed by Greg Kroah-Hartman
Browse files

net: atlantic: fix potential memory leak in aq_ndev_close()

[ Upstream commit 65e5d27d

 ]

If aq_nic_stop() fails, aq_ndev_close() returns err without calling
aq_nic_deinit() to release the relevant memory and resource, which
will lead to a memory leak.

We can fix it by deleting the if condition judgment and goto statement to
call aq_nic_deinit() directly after aq_nic_stop() to fix the memory leak.

Signed-off-by: default avatarJianglei Nie <niejianglei2021@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3287f0d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment