| Message ID | 20260416023021.626949-18-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306677; bh=AAR0OMeUJcu/WqzLj0xiYjtRYFdsvChOtS6yG0FtOoQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AjL2GvCcWfwVZYaKAEPXZL4pLSJDfyQV5bZHbf1Ydsc5w05vCDT6KxRidLrDneTy1 v/d5zuXHLtM9H9dssyKCIKiqk1ic+DYxYwiRn46Adsyc5BNFfFTSbRtudflxgvbHO6 2IZzXX6r+XzXG/WroxYTKb4Lv/iJtCGmF4t+vAL4= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BA0886A4D6 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:17 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2MQNL4N0-2fJ for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306670; bh=AAR0OMeUJcu/WqzLj0xiYjtRYFdsvChOtS6yG0FtOoQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=kH0hVlOc2/Di2Buq5rcSWcNpGf7w+gLp6OoXCZBKWveU6cq6xEz446IuyhaVKh91G 4BEwpiCHbp8H+9LEbYkuw4mELxNhLyQTvYyqky84v0ENzf0uIyfbvAxKAWrVovYsrS lfCu0ZBEjMSZJEVN9z6DkzeAvGmRpyz9OvHvRFt0= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B7BAC6A4A0 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:10 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306667; bh=dOqAw8Mz/tW117uVPShP3HHEVvVT2/RNF7YWiZkJ0Ig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NTVylaZKyVm3aoBhqBMZn8rzpbSTcKK+tNaEGMR+Z+b3VX5hCNHSE3dugI+Kq6m1D bqrTuxlC7AwxqrmGtpSbSUgqniQX5TTaF6aRXX+FQk9wt0eJ5pAGHMZiQOVb4oMVKK Nta87xac9YOx4/wag9ulBJxGLTpcCmOERE+QuOA8= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 29CF16A4BD; Wed, 15 Apr 2026 20:31:07 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 9NPTdLN08_dX; Wed, 15 Apr 2026 20:31:07 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306665; bh=/PPNRzEHA/zPunMNSxHZfgLx/oU4EKFHvdT18XK8JYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A4NBuBN89jcfcDuhhgXZgT0d7O8b8ERCqjXQPAsOx7h3hsDVHxOttP41RVhMalEqY 5f3IeCOTQnPuQrcbeNGZ0jGAw7xB4bHOZwPQVnwEgvqXT2X6ue/YdyJPh3sgNjRrRh sE8XWOTN6QItQ6yJRYvIiol42KmHRCGcIUOEdOiA= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 56C026A44C; Wed, 15 Apr 2026 20:31:05 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:42 -0600 Message-ID: <20260416023021.626949-18-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260416023021.626949-1-sjg@u-boot.org> References: <20260416023021.626949-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: NER6WQ57LMN7HNT6KPHPE22ACEMNOC4A X-Message-ID-Hash: NER6WQ57LMN7HNT6KPHPE22ACEMNOC4A X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 17/33] boot: Free the logo buffer when freeing a bootflow List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/NER6WQ57LMN7HNT6KPHPE22ACEMNOC4A/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
Fix memory leaks and test pollution in sandbox tests
|
|
Commit Message
Simon Glass
April 16, 2026, 2:29 a.m. UTC
From: Simon Glass <sjg@chromium.org> script_read_bootflow_file() reads boot.bmp into a local abuf and then moves the pointer into bflow->logo with abuf_uninit_move() The logo buffer is allocated but bootflow_free() never frees it, so every scanned bootflow that has a logo leaks the whole image. Free bflow->logo alongside the other bootflow fields. Signed-off-by: Simon Glass <sjg@chromium.org> --- boot/bootflow.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/boot/bootflow.c b/boot/bootflow.c index ff98cc4aa56..28502c309b6 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -754,6 +754,7 @@ void bootflow_free(struct bootflow *bflow) free(bflow->fname); if (!(bflow->flags & BOOTFLOWF_STATIC_BUF)) free(bflow->buf); + free(bflow->logo); free(bflow->os_name); free(bflow->fdt_fname); /* bootmeth_priv is only set when method is set */