All of lore.kernel.org
 help / color / mirror / Atom feed
From: matthieu castet <castet.matthieu@free.fr>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, usbatm@lists.infradead.org,
	linux-usb-devel@lists.sourceforge.net,
	ueagle <ueagleatm-dev@gna.org>
Subject: Re: [PATCH 4/4] UEAGLE : memory leack fix
Date: Sun, 02 Apr 2006 18:45:46 +0200	[thread overview]
Message-ID: <442FFFBA.10000@free.fr> (raw)
In-Reply-To: <442FFE5B.3040409@free.fr>

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]

matthieu castet wrote:
> Hi,
> 
> this patch fix leak of memory allocated to intr if allocation of 
> sc->urb_int fails.
> Found by the Coverity checker.
> 
add correct path for the file name
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>


[-- Attachment #2: ueagle4.patch --]
[-- Type: text/plain, Size: 642 bytes --]

Index: ueagle-atm.c
===================================================================
--- linux-2.6.15.old/drivers/usb/atm/ueagle-atm.c	(révision 266)
+++ linux-2.6.15/drivers/usb/atm/ueagle-atm.c	(révision 267)
@@ -1376,7 +1376,7 @@
 	if (ret < 0) {
 		uea_err(INS_TO_USBDEV(sc),
 		       "urb submition failed with error %d\n", ret);
-		goto err1;
+		goto err;
 	}
 
 	sc->kthread = kthread_run(uea_kthread, sc, "ueagle-atm");
@@ -1390,10 +1390,10 @@
 
 err2:
 	usb_kill_urb(sc->urb_int);
-err1:
-	kfree(intr);
 err:
 	usb_free_urb(sc->urb_int);
+	sc->urb_int = NULL;
+	kfree(intr);
 	uea_leaves(INS_TO_USBDEV(sc));
 	return -ENOMEM;
 }

      reply	other threads:[~2006-04-02 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02 16:39 [PATCH 4/4] UEAGLE : memory leack fix matthieu castet
2006-04-02 16:45 ` matthieu castet [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=442FFFBA.10000@free.fr \
    --to=castet.matthieu@free.fr \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=ueagleatm-dev@gna.org \
    --cc=usbatm@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.