linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix leak in aty fb code. (fwd)
@ 2004-09-02  9:44 Geert Uytterhoeven
  2004-09-02 20:56 ` Antonino A. Daplas
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2004-09-02  9:44 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development

---------- Forwarded message ----------
Date: Wed, 1 Sep 2004 16:51:21 +0100
From: Dave Jones <davej@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix leak in aty fb code.

Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@redhat.com>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/video/aty/atyfb_base.c linux-2.6/drivers/video/aty/atyfb_base.c
--- bk-linus/drivers/video/aty/atyfb_base.c	2004-08-01 00:00:35.000000000 +0100
+++ linux-2.6/drivers/video/aty/atyfb_base.c	2004-08-23 14:08:20.000000000 +0100
@@ -2374,6 +2374,7 @@ int __init atyfb_init(void)
 		}
 	}
 #endif				/* CONFIG_ATARI */
+	kfree(info);
 	return 0;
 }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix leak in aty fb code. (fwd)
  2004-09-02  9:44 [PATCH] Fix leak in aty fb code. (fwd) Geert Uytterhoeven
@ 2004-09-02 20:56 ` Antonino A. Daplas
  0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2004-09-02 20:56 UTC (permalink / raw)
  To: linux-fbdev-devel, Geert Uytterhoeven; +Cc: davej

On Thursday 02 September 2004 17:44, Geert Uytterhoeven wrote:
> ---------- Forwarded message ----------
> Date: Wed, 1 Sep 2004 16:51:21 +0100
> From: Dave Jones <davej@redhat.com>
> To: linux-kernel@vger.kernel.org
> Subject: [PATCH] Fix leak in aty fb code.
>
> Spotted with the source checker from Coverity.com.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
>
>
> diff -urpN --exclude-from=/home/davej/.exclude
> bk-linus/drivers/video/aty/atyfb_base.c
> linux-2.6/drivers/video/aty/atyfb_base.c ---
> bk-linus/drivers/video/aty/atyfb_base.c	2004-08-01 00:00:35.000000000 +0100
> +++ linux-2.6/drivers/video/aty/atyfb_base.c	2004-08-23 14:08:20.000000000
> +0100 @@ -2374,6 +2374,7 @@ int __init atyfb_init(void)
>  		}
>  	}
>  #endif				/* CONFIG_ATARI */
> +	kfree(info);
>  	return 0;
>  }
>

This is also incorrect, and will actually cause a crash. This is part of
init code, and info should not be freed.  It will be freed in
cleanup_module().

Tony




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-02 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-02  9:44 [PATCH] Fix leak in aty fb code. (fwd) Geert Uytterhoeven
2004-09-02 20:56 ` Antonino A. Daplas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).