| Message ID | 20260416023021.626949-24-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=1776306682; bh=MlCncGO9q8HfJ2F3tWeId0jpNoPgkPv7NYjfxL3L8YQ=; 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=iLE4A8zg/TpvLS8XkIVTOEg5nCqrIbBdQItEA8LQybXyYeLqee7Nn/TeZ/CUko/yQ v5qUgrRpQ/PNumT6OML7m7hQ3bfAhXka7sXfGWt6EvOFDBS7WxhnA0WimwKD1Hxi+j /ouocYgQOX7BImueXUo+ThzLNjK+Aymkm+tnb0vg= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9B70C6A4B8 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:22 -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 GMrpJgvm1r7l for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:22 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306682; bh=MlCncGO9q8HfJ2F3tWeId0jpNoPgkPv7NYjfxL3L8YQ=; 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=iLE4A8zg/TpvLS8XkIVTOEg5nCqrIbBdQItEA8LQybXyYeLqee7Nn/TeZ/CUko/yQ v5qUgrRpQ/PNumT6OML7m7hQ3bfAhXka7sXfGWt6EvOFDBS7WxhnA0WimwKD1Hxi+j /ouocYgQOX7BImueXUo+ThzLNjK+Aymkm+tnb0vg= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 064166A4A6 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:22 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306679; bh=vtgXVYXVUY9wXpmKb3WOVRashdzQlHypLWv7aSr0pKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qFlGqiJtbYJ74pg58i5fOn1MHzvGn4L5nuuiNCsrQpDqAbr5Lm3vrZJJhsS5RGXIT f5A1BYqm+ByhxEnkAc8IolfcUQ7FS4l06y1Y47J0pERjE+I2JPG6O3VOMdAJA6fDpZ 8LU+3/V62oIVRGuFOUG+h23kIY0O4dJ54ZCCMIq8= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2B44B6A4D3; Wed, 15 Apr 2026 20:31:19 -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 pgvoMEvsUXpP; Wed, 15 Apr 2026 20:31:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306672; bh=JNHDwcA76Jdw1DwHAjM38k8+oj09ynEMBoskCT83ksk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SmU6Ga429EY3tDVdGNp2orvCCDW42fjTlU1NYO8kui89s397Y3MPjfqujfnY/yWkC gp7/s+tolRJ7ZKm05fB22gK++g+D9ZBvyA/ZWGP+EAEgEq2V0hI7ahbzeGSlGISuI5 LTHvIbPiNe+B/x/wLsFcDet0U3pd6Y/LAZvLknVs= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 5BED66A4B8; Wed, 15 Apr 2026 20:31:12 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:48 -0600 Message-ID: <20260416023021.626949-24-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: A2HVJE6Q6QIZTARC7T6VIK5AG2LUX2US X-Message-ID-Hash: A2HVJE6Q6QIZTARC7T6VIK5AG2LUX2US 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 23/33] test: dm: Dispose tree in livetree_ensure() 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/A2HVJE6Q6QIZTARC7T6VIK5AG2LUX2US/> 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 dm_test_oftree_new() test unflattens a secondary device tree using oftree_from_fdt() but never frees it, thus leaking about 6K of memory per run. Dispose of the tree before returning. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/dm/ofnode.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index 0f60c2a6281..516e24ceb28 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -1492,6 +1492,8 @@ static int dm_test_livetree_ensure(struct unit_test_state *uts) ut_asserteq_str("sandbox-other2", ofnode_read_string(node, "compatible")); + oftree_dispose(tree); + return 0; } DM_TEST(dm_test_livetree_ensure, UTF_SCAN_FDT);