]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
authorMateusz Palczewski <mateusz.palczewski@intel.com>
Thu, 19 Oct 2023 20:40:35 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 10:21:05 +0000 (11:21 +0100)
commit85e60d18d25e98a69eff792701ee3786dff16264
treedb589cbe67078152a80788b397b952372e8739ee
parent9dce306d9e54281c009404863e7b1b94325180b1
igb: Fix potential memory leak in igb_add_ethtool_nfc_entry

[ Upstream commit 8c0b48e01daba5ca58f939a8425855d3f4f2ed14 ]

Add check for return of igb_update_ethtool_nfc_entry so that in case
of any potential errors the memory alocated for input will be freed.

Fixes: 0e71def25281 ("igb: add support of RX network flow classification")
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igb/igb_ethtool.c