Skip to content
Commit 3243e64e authored by Ma Ke's avatar Ma Ke Committed by Greg Kroah-Hartman
Browse files

net: mana: Fix possible double free in error handling path

[ Upstream commit 1864b822 ]

When auxiliary_device_add() returns error and then calls
auxiliary_device_uninit(), callback function adev_release
calls kfree(madev). We shouldn't call kfree(madev) again
in the error handling path. Set 'madev' to NULL.

Fixes: a69839d4

 ("net: mana: Add support for auxiliary device")
Signed-off-by: default avatarMa Ke <make24@iscas.ac.cn>
Link: https://patch.msgid.link/20240625130314.2661257-1-make24@iscas.ac.cn
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 952bf8df
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