linux/drivers/net/ethernet/sfc
Abdun Nihaal 46a499aaf8 sfc: fix potential memory leak in efx_mae_process_mport()
In efx_mae_enumerate_mports(), memory allocated for mae_mport_desc is
passed as a argument to efx_mae_process_mport(), but when the error path
in efx_mae_process_mport() gets executed, the memory allocated for desc
gets leaked.

Fix that by freeing the memory allocation before returning error.

Fixes: a6a15aca42 ("sfc: enumerate mports in ef100")
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://patch.msgid.link/20251023141844.25847-1-nihaal@cse.iitm.ac.in
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-10-27 17:55:41 -07:00
..
falcon pci-v6.18-changes 2025-10-06 10:41:03 -07:00
siena pci-v6.18-changes 2025-10-06 10:41:03 -07:00
Kconfig sfc: document devlink flash support 2025-02-11 17:12:17 -08:00
Makefile sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
bitfield.h
ef10.c udp_tunnel: remove rtnl_lock dependency 2025-06-18 18:53:51 -07:00
ef10_regs.h
ef10_sriov.c
ef10_sriov.h
ef100.c
ef100.h
ef100_ethtool.c net: ethtool: only allow set_rxnfc with rss + ring_cookie if driver opts in 2024-11-14 19:53:41 -08:00
ef100_ethtool.h
ef100_netdev.c sfc: fix NULL dereferences in ef100_process_design_param() 2025-04-03 15:08:25 -07:00
ef100_netdev.h
ef100_nic.c sfc: fix NULL dereferences in ef100_process_design_param() 2025-04-03 15:08:25 -07:00
ef100_nic.h
ef100_regs.h
ef100_rep.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
ef100_rep.h
ef100_rx.c sfc: add per-queue RX bytes stats 2024-10-06 16:02:23 +01:00
ef100_rx.h
ef100_sriov.c
ef100_sriov.h
ef100_tx.c net: gso: restore ids of outer ip headers correctly 2025-09-25 12:42:49 +02:00
ef100_tx.h
efx.c sfc: rip out MDIO support 2025-03-25 07:55:10 -07:00
efx.h sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
efx_channels.c net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
efx_channels.h sfc: implement per-queue rx drop and overrun stats 2024-10-06 16:02:23 +01:00
efx_common.c PCI/ERR: Remove remnants of .link_reset() callback 2025-08-13 13:21:02 -05:00
efx_common.h sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
efx_devlink.c sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
efx_devlink.h
efx_reflash.c sfc: support X4 devlink flash 2025-03-25 07:55:11 -07:00
efx_reflash.h sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
enum.h
ethtool.c ethtool: add FEC bins histogram report 2025-09-26 16:49:18 -07:00
ethtool_common.c net: ethtool: move rxfh_fields callbacks under the rss_lock 2025-06-30 08:41:24 -07:00
ethtool_common.h eth: sfc: migrate to new RXFH callbacks 2025-06-21 07:53:39 -07:00
filter.h
fw_formats.h sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
io.h sfc: remove efx_writed_page_locked 2024-12-19 19:14:39 -08:00
mae.c sfc: fix potential memory leak in efx_mae_process_mport() 2025-10-27 17:55:41 -07:00
mae.h sfc: Remove unused efx_mae_mport_vf 2024-11-05 17:35:11 -08:00
mae_counter_format.h
mcdi.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
mcdi.h sfc: extend NVRAM MCDI handlers 2025-02-11 17:12:17 -08:00
mcdi_filters.c
mcdi_filters.h
mcdi_functions.c
mcdi_functions.h
mcdi_mon.c
mcdi_pcol.h net: Fix typos 2025-07-25 10:29:07 -07:00
mcdi_pcol_mae.h
mcdi_port.c sfc: rip out MDIO support 2025-03-25 07:55:10 -07:00
mcdi_port.h
mcdi_port_common.c sfc: rip out MDIO support 2025-03-25 07:55:10 -07:00
mcdi_port_common.h
mtd.c
net_driver.h sfc: eliminate xdp_rxq_info_valid using XDP base API 2025-07-01 17:01:15 -07:00
nic.c net: sfc: use ethtool string helpers 2024-11-09 09:10:37 -08:00
nic.h sfc: Add X4 PF support 2024-09-11 16:02:21 -07:00
nic_common.h net: sfc: use ethtool string helpers 2024-11-09 09:10:37 -08:00
ptp.c net: sfc: use ethtool string helpers 2024-11-09 09:10:37 -08:00
ptp.h net: sfc: use ethtool string helpers 2024-11-09 09:10:37 -08:00
rx.c sfc: add per-queue RX bytes stats 2024-10-06 16:02:23 +01:00
rx_common.c sfc: eliminate xdp_rxq_info_valid using XDP base API 2025-07-01 17:01:15 -07:00
rx_common.h
selftest.c
selftest.h
sriov.c
sriov.h
tc.c sfc: Remove newline at the end of a netlink error message 2025-02-27 18:11:37 -08:00
tc.h
tc_bindings.c
tc_bindings.h
tc_conntrack.c net: sfc: Correct key_len for efx_tc_ct_zone_ht_params 2025-01-02 17:11:41 -08:00
tc_conntrack.h
tc_counters.c sfc: Convert to use ERR_CAST() 2024-08-30 11:10:02 -07:00
tc_counters.h
tc_encap_actions.c ipv4: Convert ->flowi4_tos to dscp_t. 2025-08-26 17:34:31 -07:00
tc_encap_actions.h
tx.c sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
tx.h sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
tx_common.c sfc: implement per-queue TSO (hw_gso) stats 2024-10-06 16:02:23 +01:00
tx_common.h sfc: account XDP TXes in netdev base stats 2024-10-06 16:02:23 +01:00
tx_tso.c
workarounds.h