s5pc110: fb: possible memory leak (un-free'd malloc)
[kernel/u-boot.git] / drivers / video / s5p-fb.c
index 9afe55c..3e90e21 100644 (file)
@@ -222,6 +222,7 @@ static void draw_samsung_logo(void* lcdbase)
                printf("Image could be truncated"
                                " (increase CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)!\n");
        _draw_samsung_logo(lcdbase, x, y, width, height, (unsigned short *) dst);
+       free(dst);
 }
 
 static void lcd_panel_on(vidinfo_t *vid)
@@ -256,11 +257,15 @@ static void lcd_panel_on(vidinfo_t *vid)
 
 /* extern void init_onenand_ext2(void); */
 extern void init_panel_info(vidinfo_t *vid);
+extern int s5p_no_lcd_support(void);
 
 void lcd_ctrl_init(void *lcdbase)
 {
        char *option;
 
+       if (s5p_no_lcd_support())
+               return;
+
        s5pc_lcd_init_mem(lcdbase, &panel_info);
 
        /* initialize parameters which is specific to panel. */