[Concept,17/17] video: Fix map_to_sysmem() leak in show_splash()

Message ID 20260316183050.3855921-18-sjg@u-boot.org
State New
Headers
Series Add automatic memory-leak detection to U-Boot tests |

Commit Message

Simon Glass March 16, 2026, 6:30 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

show_splash() calls map_to_sysmem() to convert the splash image pointer
to a physical address but never unmaps it, leaking a sandbox
memory-mapping entry. Add the missing unmap_sysmem() call.

Fixes: 84e63abfff67 ("video: Support showing the U-Boot logo")
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/video/video-uclass.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index b492ff313aa..20d98798520 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -661,6 +661,7 @@  static int show_splash(struct udevice *dev)
 
 	data = video_image_getptr(u_boot);
 	ret = video_bmp_display(dev, map_to_sysmem(data), -4, 4, true);
+	unmap_sysmem(data);
 
 	return 0;
 }