mt76: testmode: fix memory leak in mt76_testmode_alloc_skb

[ Upstream commit fe2c3b1fc6 ]

Free all pending frames in case of failure in mt76_testmode_alloc_skb
routine

Fixes: 2601dda8fa ("mt76: testmode: add support to send larger packet")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Lorenzo Bianconi 2021-05-27 13:35:28 +02:00 • committed by Greg Kroah-Hartman
commit 5b2deebec2