diff options
author | Zhipeng Lu <alexious@zju.edu.cn> | 2024-01-23 01:24:42 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-01-24 18:03:53 -0800 |
commit | f6cc4b6a3ae53df425771000e9c9540cce9b7bb1 (patch) | |
tree | e26e8e07ee5c5e37ac6fd21a36f6aa495db0253d /net/unix/af_unix.c | |
parent | 77be22473b28f0538d69d58f64d35091095688cd (diff) |
fjes: fix memleaks in fjes_hw_setup
In fjes_hw_setup, it allocates several memory and delay the deallocation
to the fjes_hw_exit in fjes_probe through the following call chain:
fjes_probe
|-> fjes_hw_init
|-> fjes_hw_setup
|-> fjes_hw_exit
However, when fjes_hw_setup fails, fjes_hw_exit won't be called and thus
all the resources allocated in fjes_hw_setup will be leaked. In this
patch, we free those resources in fjes_hw_setup and prevents such leaks.
Fixes: 2fcbca687702 ("fjes: platform_driver's .probe and .remove routine")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240122172445.3841883-1-alexious@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions