| Message ID | 20260416023021.626949-27-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=1776306687; bh=odxEZhcLSFwQQUGCVMP5exN67wiFBN5qvOCcE1HcSS4=; 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=LaFWKmg8SsbGAnhVokq46NdFZ3Ro2VcMx05i3iNE1oaHopVA7hMVQihXxBUBcwoqt kBNPKnPBtWImogJXuk26nFR4hOe6cONT29fLSAC1FW8Dq7ErNT7GtHAWxLl8d7NBgj KD8aW+KMgHvRPubwRvZl8bEhI6HRyBHWVrbgSFfA= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 41BF76A4E5 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:27 -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 iQ24B0HbLNoZ for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:27 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306685; bh=odxEZhcLSFwQQUGCVMP5exN67wiFBN5qvOCcE1HcSS4=; 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=W8e5i16yhopdkr9fFaLoDfns34c7mQ80Jei+PZJp7o9ZN2HJhhEmoNmO44I5F5o/A n1WvOojwysm7cmtZK1+76s0eFpwOjzVlnNYsJfsdGvyPh05nPeAGEmhn4C/0KrjPxX ceOwDKxBAMLiq1Hdr9/Bkqb+t23DLdmvaRhC+JZ0= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5C1BA6A4C9 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:25 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306680; bh=293GNik1rmGvRuJ7FYAzPABe9XxudgCY/sRn9g6NiYA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HQwYoLE/M8+fjMaRSQqAEoiikAwQpgFQAsFhZJlABN7F7F8zUoIKJl6cCfCI92d9R oRr8DC2yDXOzeJ4AzvgQ09R6jNkh2gTG/WixI0KZzqnBTfSmqu/0oLPtIgh1V958XW gVDG27yub7YNKU8/UJpMpF/gq8armFxlrNw/oHwk= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4BD736A4B0; Wed, 15 Apr 2026 20:31:20 -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 T0gWgA7XSDvf; Wed, 15 Apr 2026 20:31:20 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306676; bh=4yEyrpBUoBqpgrluL1HFJvWEaZYywCz3lkkxVF0E4XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a7LamjgdYw7rGw7uzWh4hAJCcW4n8h7d8eEnlu4OlKk+frHDfxrkidcZdH/JPTpFq MXSZC56P55VHI/wviSQulbmK4hb9UCuzZALcwaLu+CO8u9wMQkD6PSbzhIqHIfgW6y POfeoWH29vwGAYDS4HwPg9iU3b6uFyFABlNyuIC8= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D4A516A4BC; Wed, 15 Apr 2026 20:31:15 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:51 -0600 Message-ID: <20260416023021.626949-27-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: 7KZW6PSKOUGHTENQFYSD3MDTEKANBH25 X-Message-ID-Hash: 7KZW6PSKOUGHTENQFYSD3MDTEKANBH25 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 26/33] test: dm: Release resources in oftree_to_fdt(() test 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/7KZW6PSKOUGHTENQFYSD3MDTEKANBH25/> 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 test allocates two abufs via oftree_to_fdt() and a live tree via oftree_from_fdt(), but never frees them, leaking about 200K each time the test runs. Dispose of the live tree and uninit the abufs at the end of the test. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/dm/ofnode.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index 3fd3b8509f9..68e436da929 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -1629,6 +1629,10 @@ static int dm_test_oftree_to_fdt(struct unit_test_state *uts) ut_asserteq(abuf_size(&buf), abuf_size(&buf2)); ut_asserteq_mem(abuf_data(&buf), abuf_data(&buf2), abuf_size(&buf)); + oftree_dispose(check); + abuf_uninit(&buf); + abuf_uninit(&buf2); + return 0; } DM_TEST(dm_test_oftree_to_fdt, UTF_SCAN_FDT);