]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/sun3_82586: fix potential memory leak in sun3_82586_send_packet()
authorWang Hai <wanghai38@huawei.com>
Tue, 15 Oct 2024 14:41:48 +0000 (22:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 00:52:36 +0000 (01:52 +0100)
commit9c6ce55e6f0bd1541f112833006b4052614c7d94
treec187d43252cb09c1ee9a14a2a7838d10e57fce0b
parent45cb99c5b95eb21de041c747c7a08e6af6b3a5e8
net/sun3_82586: fix potential memory leak in sun3_82586_send_packet()

[ Upstream commit 2cb3f56e827abb22c4168ad0c1bbbf401bb2f3b8 ]

The sun3_82586_send_packet() returns NETDEV_TX_OK without freeing skb
in case of skb->len being too long, add dev_kfree_skb() to fix it.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Message-ID: <20241015144148.7918-1-wanghai38@huawei.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/i825xx/sun3_82586.c