mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Jeff Garzik <jgarzik@pobox.com>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.5 IrDA] irtty leaks
Date: Wed, 9 Jul 2003 16:50:20 -0700	[thread overview]
Message-ID: <20030709235020.GD12747@bougret.hpl.hp.com> (raw)

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);

                 reply	other threads:[~2003-07-09 23:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030709235020.GD12747@bougret.hpl.hp.com \
    --to=jt@bougret.hpl.hp.com \
    --cc=jgarzik@pobox.com \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®