All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe W Damasio <felipewd@terra.com.br>
To: lethal@chaoticdreams.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] memory leak in imsttfb video driver
Date: Mon, 06 Oct 2003 18:16:49 -0300	[thread overview]
Message-ID: <3F81DBC1.4010003@terra.com.br> (raw)

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

	Hi Paul,

	Patch against 2.6.0-test6.

	- Fixes 2 leaks in imsttfb driver: Frees the info struct imstt_par 
and releases the mem region if the device type is unknown.

	Found by smatch.

	Please consider applying,

	Thanks.

Felipe

[-- Attachment #2: imsttfb-leak.patch --]
[-- Type: text/plain, Size: 383 bytes --]

--- linux-2.6.0-test6/drivers/video/imsttfb.c.orig	2003-10-06 18:03:53.000000000 -0300
+++ linux-2.6.0-test6/drivers/video/imsttfb.c	2003-10-06 18:12:30.000000000 -0300
@@ -1495,6 +1495,8 @@
 		default:
 			printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
 					 "contact maintainer.\n", pdev->device);
+			kfree(info);
+			release_mem_region(addr, size);
 			return -ENODEV;
 	}
 

                 reply	other threads:[~2003-10-06 21:16 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=3F81DBC1.4010003@terra.com.br \
    --to=felipewd@terra.com.br \
    --cc=lethal@chaoticdreams.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --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 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.