diff options
author | Yongzhi Liu <[email protected]> | 2024-03-06 18:57:14 +0800 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2024-03-07 12:03:19 +0100 |
commit | ba18deddd6d502da71fd6b6143c53042271b82bd (patch) | |
tree | 00ceb6ab7fb3cea66ace3e939d862e15f79ef9f9 /drivers/net/ethernet/intel/igc/igc_main.c | |
parent | d5b8aff73d159b9157db0ad3281a9af3185d59fa (diff) |
net: pds_core: Fix possible double free in error handling path
When auxiliary_device_add() returns error and then calls
auxiliary_device_uninit(), Callback function pdsc_auxbus_dev_release
calls kfree(padev) to free memory. We shouldn't call kfree(padev)
again in the error handling path.
Fix this by cleaning up the redundant kfree() and putting
the error handling back to where the errors happened.
Fixes: 4569cce43bc6 ("pds_core: add auxiliary_bus devices")
Signed-off-by: Yongzhi Liu <[email protected]>
Reviewed-by: Wojciech Drewek <[email protected]>
Reviewed-by: Shannon Nelson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
0 files changed, 0 insertions, 0 deletions