mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Matthias Hahn <pmhahn@titan.lahn.de>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: <linux-irda@pasta.cs.UiT.No>
Subject: [PATCH] Re: [CHECKER] free errors for 2.4.6 and 2.4.6ac2
Date: Sun, 15 Jul 2001 17:39:16 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.33.0107141202250.6232-100000@localhost> (raw)
In-Reply-To: <Pine.GSO.4.31.0107131551270.15960-100000@myth2.Stanford.EDU>

Hi Dag, Jean, LKML!

On Fri, 13 Jul 2001, Evan Parker wrote:

> Enclosed are 10 bugs where code uses memory that has already been
> freed.
...
> 1	|	/home/eparker/tmp/linux/2.4.6-ac2/drivers/net/irda/ali-ircc.c/

Here's the patch for review:

--- linux-2.4.7/drivers/net/irda/ali-ircc.c~	Thu Jul 12 14:20:56 2001
+++ linux-2.4.7/drivers/net/irda/ali-ircc.c	Sat Jul 14 12:01:07 2001
@@ -331,8 +331,8 @@
 	self->tx_buff.head = (__u8 *) kmalloc(self->tx_buff.truesize,
 					      GFP_KERNEL|GFP_DMA);
 	if (self->tx_buff.head == NULL) {
-		kfree(self);
 		kfree(self->rx_buff.head);
+		kfree(self);
 		return -ENOMEM;
 	}
 	memset(self->tx_buff.head, 0, self->tx_buff.truesize);

BYtE
Philipp
-- 
  / /  (_)__  __ ____  __ Philipp Hahn
 / /__/ / _ \/ // /\ \/ /
/____/_/_//_/\_,_/ /_/\_\ pmhahn@titan.lahn.de



      reply	other threads:[~2001-07-15 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-13 22:54 Evan Parker
2001-07-15 15:39 ` Philipp Matthias Hahn [this message]

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=Pine.LNX.4.33.0107141202250.6232-100000@localhost \
    --to=pmhahn@titan.lahn.de \
    --cc=linux-irda@pasta.cs.UiT.No \
    --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®