public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH V2] video: Add missing free for logo memory
@ 2008-04-21  9:19 Matthias Fuchs
  2008-04-21 12:12 ` Rodolfo Giometti
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Fuchs @ 2008-04-21  9:19 UTC (permalink / raw)
  To: u-boot

This patch adds two missing free()s.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
---
 drivers/video/cfb_console.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 4f73067..68b9861 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -849,6 +849,7 @@ int video_display_bitmap (ulong bmp_image, int x, int y)
 		if (!((bmp->header.signature[0] == 'B') &&
 		      (bmp->header.signature[1] == 'M'))) {
 			printf ("Error: no valid bmp.gz image at %lx\n", bmp_image);
+			free(dst);
 			return 1;
 		}
 #else
@@ -869,6 +870,10 @@ int video_display_bitmap (ulong bmp_image, int x, int y)
 	if (compression != BMP_BI_RGB) {
 		printf ("Error: compression type %ld not supported\n",
 			compression);
+#ifdef CONFIG_VIDEO_BMP_GZIP
+		if (dst)
+			free(dst);
+#endif
 		return 1;
 	}
 
-- 
1.5.3

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

end of thread, other threads:[~2008-04-21 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-21  9:19 [U-Boot-Users] [PATCH V2] video: Add missing free for logo memory Matthias Fuchs
2008-04-21 12:12 ` Rodolfo Giometti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox