mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: fs_enet: fix platform info memory leak on remove
fs_enet_probe() allocates the platform information structure with kzalloc_obj() and stores it in fep->fpi. The probe failure paths release this allocation with kfree(). However, after a successful probe, fs_enet_remove() tears down the network device without freeing fep->fpi, leaving the platform information structure allocated after driver removal. Free fep->fpi before releasing the network device. This issue was found by manual code inspection. Cc: stable+noautosel@kernel.org # untested fix to a driver init path Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260916031414.2875022-1-lgs201920130244@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0a9b6e9385
commit
4a67649006
1 changed files with 1 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue