| Message ID | 20260416023021.626949-25-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=1776306684; bh=/zU1fH7duC7npABm5ICrrUFeHJI/BXXbbLR+1jEBam8=; 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=qIBVNg8lsOB4TXYW5/T57o4PEAHf2YxyFGDaH0YTatUVU6WQWEMREYWkN4ikg0NdB +haP0xNZqohqFV8jibGTN37QahDgVqQHcaMVdNhg3j74b43ohbXIHDOIc4FciqAESi qKITIsVXQ8n83nmYeL8QpluI5J/2e19372t/49kA= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 52AD76A4BC for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:24 -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 EYpPf_vfkpZq for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:24 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306683; bh=/zU1fH7duC7npABm5ICrrUFeHJI/BXXbbLR+1jEBam8=; 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=pnfwm0Q/4pHzw1IVZUxMTEWbPFVZeiajkq11OqHEH9EGi45WeiBYQpAy1Y7U+CeDs kkGHNN9sx0PzufyKi/QqhlwcvZe35g1I/D4hTu8w+r/7T2VzTmmyqjnb+RYXbp5pJW dFwp5LAfnKOICIqGmRy+lo7D5RZZiZV4GKlgYUtU= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 54F7E6A44C for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:23 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306679; bh=lS0gj8NV8FTnQWW74povkKdm3WllVKbjHppFVozEuJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MmbNtIlJKXZpSCVT5Yn3h+tyKCGuGRn0Elkm10xLCG5KzStKscVFtWIYwj0EXPH2J rO1TxjbihjvB18H08si5TCtA4oG5m8qRIYqQ30k/5nhbr1QzTajVocUKZ20NxvL6Jt Kwinx9ieKjWMnQjzlUY59k56Nk60YrOTArf86tq0= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4432D6A4DB; 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 E7LspdyDQUs1; 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=1776306673; bh=O32M6W8jEaILS1+9RXePCW8LI16eXmGgD7Mqv8bVlBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jw9kDrcrdccFBB5dIuHLiieKzh8QK2WHL7TxXlJvhnkRqYJvnCPfzF+vFyCVNUtzI w8cVFXy3ZmjBG61nbw7eNn+SZRS6zJSYB5nrPXFkuT/FBzbTESP2cFQ5/xr8XpO21D y0rbeizzJIjE4QoPTadhT9m3ILKqm9SsLPKngt3w= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 651846A4A8; Wed, 15 Apr 2026 20:31:13 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:49 -0600 Message-ID: <20260416023021.626949-25-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: Y7HCY4R6ITFPJ2AUVVW4GU25PUOZPCIY X-Message-ID-Hash: Y7HCY4R6ITFPJ2AUVVW4GU25PUOZPCIY 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 24/33] test: dm: Dispose tree in oftree_new 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/Y7HCY4R6ITFPJ2AUVVW4GU25PUOZPCIY/> 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> The oftree_new test allocates a live tree via oftree_new() and never disposes of it. Release the root on exit so the test-local tree is cleaned up. Note: of_live_free() currently only frees the root node, so subnodes added via ofnode_add_subnode() still leak. We'll deal with that later. 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 516e24ceb28..838a216cfa9 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -1510,6 +1510,8 @@ static int dm_test_oftree_new(struct unit_test_state *uts) check = ofnode_find_subnode(node, "edmund"); ut_asserteq(check.of_offset, subnode.of_offset); + oftree_dispose(tree); + return 0; } DM_TEST(dm_test_oftree_new, UTF_SCAN_FDT);