linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libertas: Fix a double free in if_spi_c2h_data()
@ 2019-06-26 10:09 Dan Carpenter
  2019-06-26 13:16 ` Dan Williams
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Carpenter @ 2019-06-26 10:09 UTC (permalink / raw)
  To: Kalle Valo, Philip Rakity
  Cc: Allison Randal, Lubomir Rintel, libertas-dev, linux-wireless,
	kernel-janitors

The lbs_process_rxed_packet() frees the skb.  It didn't originally, but
we fixed it in commit f54930f36311 ("libertas: don't leak skb on receive
error").

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/wireless/marvell/libertas/if_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas/if_spi.c b/drivers/net/wireless/marvell/libertas/if_spi.c
index 27067e79e83f..e38f02d1f2e4 100644
--- a/drivers/net/wireless/marvell/libertas/if_spi.c
+++ b/drivers/net/wireless/marvell/libertas/if_spi.c
@@ -772,7 +772,7 @@ static int if_spi_c2h_data(struct if_spi_card *card)
 	/* pass the SKB to libertas */
 	err = lbs_process_rxed_packet(card->priv, skb);
 	if (err)
-		goto free_skb;
+		goto out;  /* lbs_process_rxed_packet() frees skb */
 
 	/* success */
 	goto out;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-08-06 12:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 10:09 [PATCH] libertas: Fix a double free in if_spi_c2h_data() Dan Carpenter
2019-06-26 13:16 ` Dan Williams
2019-06-26 13:23   ` Dan Carpenter
2019-06-26 16:02     ` Dan Williams
2019-07-05 16:42       ` [PATCH v2] " Dan Williams
2019-07-24 11:46         ` Kalle Valo
2019-07-24 14:38         ` [PATCH v3] " Dan Williams
2019-08-06 12:36           ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).