| Message ID | 20260416023021.626949-29-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=1776306688; bh=/UUuK1QuhEWBCFPoXFGTSLcYI5RKNmOQJJreDfOvQjI=; 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=HpcktCk5zO+nhJuI1jMeQD6RWX95DA/PHtIfzbh5KsM49rbczAhHoEfc2ny48ZG5h TIrkppxyLivphvyxcaSthBUg4bAkY2LVHWDgc5je7D+FcICXhUxHvS3AoaTkH5Bpou NUpuK0fQthqgJw59QGI5wUy1liLePMs/0/yPJnuc= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3F13A6A4CF for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:28 -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 hUj8TeAYqx7F for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306686; bh=/UUuK1QuhEWBCFPoXFGTSLcYI5RKNmOQJJreDfOvQjI=; 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=pt2rPWUwTbXh+3PNNj3Z9RfE/9vSeGatd36tgdaRaR/qWaAEcVCWbc0MZ2a9CjISW Tjdl7KjYU4dyL13PX/WXuUHFAQMNbtmATvrDM4hfS51rCIc/POlOPMTZINMCfB8CwV toEeorjwQHeBXHuIwCwShp7On/y6KuLOyzeOaWGI= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5671B6A4C7 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306681; bh=zm5riQjf2bhlEJF/TT3h/qDrBNQXJG6M9AjJFgJTIeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RcXMcKAzf+kD1h/FfbtCaUL67DVZCCEQrzRwu7+4vIF6dn8LPNe3h6lFii/5Q0zXz CUTWCKOOU+GKz0frLvmAnWM76Pa5xZxP/vqUITE0zK5upRe8/YSqXVZD1cTK+rWgv7 LNIlyB0cOW0f97Qkx/hKD/Z6ujl2gtLwMYME/ir4= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 211CA6A4A8; Wed, 15 Apr 2026 20:31:21 -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 jHRZVYLOnebb; Wed, 15 Apr 2026 20:31:21 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306678; bh=wvbZVy8SNuKHM4IXThXxkI6GfWNaVOeJh5S74DDsBCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kKW9ekbUJ2FOH5ZL6AhE6JoQ7i1+Q2abnx0b74Fw3rrUvZmDaeJOhayR5Jd1rAvMg 9LUkIrtyCTlsx/S+uHwx/whWLttDlIH38Dy9kXBn6jVxWkgJumGKocmDdVeDGoqCQo v5B2hnSvcKhQha2V3K9pIdQxdavxdmG263gyRuSk= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E380C6A4D9; Wed, 15 Apr 2026 20:31:17 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:53 -0600 Message-ID: <20260416023021.626949-29-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: XGGXO6KLGK7WJMZVB3EKVWHPMEQYYWYP X-Message-ID-Hash: XGGXO6KLGK7WJMZVB3EKVWHPMEQYYWYP 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 28/33] test: lib: Dispose tree in json_to_fdt_luks2() 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/XGGXO6KLGK7WJMZVB3EKVWHPMEQYYWYP/> 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> This function creates a live tree via oftree_from_fdt() but never disposes if it, leaking ~2.7K of ofnode state. Dispose of the tree before returning. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/lib/json.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/test/lib/json.c b/test/lib/json.c index 0cddddcb2a3..1c5c9215cc3 100644 --- a/test/lib/json.c +++ b/test/lib/json.c @@ -539,6 +539,7 @@ static int lib_test_json_to_fdt_luks2(struct unit_test_state *uts) /* Check keyslots_size (stored as string in JSON) */ ut_asserteq_str("3145728", ofnode_read_string(config, "keyslots_size")); + oftree_dispose(tree); abuf_uninit(&buf); return 0;