Skip to contentSkip to conversation

video: Add missing free for logo memory

PATCH New Matthias Fuchs 2 participants 2 messages Apr 21, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 video: Add missing free for logo memory

This patch adds two missing free()s.

---
 drivers/video/cfb_console.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/video/cfb_console.c +5 -0
index 4f73067..68b9861 100644
@@ -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;
 	}
 
Signature · 1 line
1.5.3
#1 lore raw

PATCH v2 1/1 video: Add missing free for logo memory

Quoted 3 lines · Matthias Fuchs

This patch adds two missing free()s.

Thanks, applied.

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail:    giometti at enneenne.com
Linux Device Driver                             giometti at linux.it
Embedded Systems                     phone:	+39 349 2432127
UNIX programming                     skype:     rodolfo.giometti