mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.5 IrDA] irtty leaks
@ 2003-07-09 23:50 Jean Tourrilhes
  0 siblings, 0 replies; only message in thread
From: Jean Tourrilhes @ 2003-07-09 23:50 UTC (permalink / raw)
  To: Jeff Garzik, Linux kernel mailing list

ir250_irttp_leak.diff :
~~~~~~~~~~~~~~~~~~~~~
		<Stanford checker>
	o [CORRECT] fix two additional potential skb leaks in IrTTP.


diff -u -p linux/net/irda/irttp.d1.c linux/net/irda/irttp.c
--- linux/net/irda/irttp.d1.c	Wed Jun  4 13:31:22 2003
+++ linux/net/irda/irttp.c	Wed Jun  4 13:34:45 2003
@@ -1094,7 +1094,8 @@ int irttp_connect_request(struct tsap_cb
 		 *  Check that the client has reserved enough space for
 		 *  headers
 		 */
-		ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER, return -1;);
+		ASSERT(skb_headroom(userdata) >= TTP_MAX_HEADER,
+		       { dev_kfree_skb(tx_skb); return -1; } );
 	}
 
 	/* Initialize connection parameters */
@@ -1123,7 +1124,7 @@ int irttp_connect_request(struct tsap_cb
 	/* SAR enabled? */
 	if (max_sdu_size > 0) {
 		ASSERT(skb_headroom(tx_skb) >= (TTP_MAX_HEADER + TTP_SAR_HEADER),
-		       return -1;);
+		       { dev_kfree_skb(tx_skb); return -1; } );
 
 		/* Insert SAR parameters */
 		frame = skb_push(tx_skb, TTP_HEADER+TTP_SAR_HEADER);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-09 23:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-09 23:50 [PATCH 2.5 IrDA] irtty leaks Jean Tourrilhes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®