From patchwork Thu Apr 16 02:29:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2188 Return-Path: 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=1776306686; bh=4AzEISFqALyrOEHUW4EcUR0T+Zrzj4zRauy0iXco0+o=; 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=NR8bdli+RcrzikB9lJ/C8Iy3Qij+jBYjmnW7NqUWCIr5nAL1lt099nl8kRheetWwW aH7hWR7wLvNJ4ShwfV9LJ4vKfBx3q9Z7SbW1QPaDXS7cxSGNqm2socTIbhdWQAPXA+ dI8xUp39b47aevkxJ62TF0XMwa6r8FSmm/8Xtimg= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B5A9D6A4E1 for ; Wed, 15 Apr 2026 20:31:26 -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 cH31a-KzQcng for ; 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=1776306684; bh=4AzEISFqALyrOEHUW4EcUR0T+Zrzj4zRauy0iXco0+o=; 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=DeUmFudCIq8bzDq7neddDd0RQfeCNysk8Mi8qbo0fSnT+MdbEwG9Z/+9yLAune+Xr 0R6oOlecdzdPjRhSGB69h97UVQWWVv6/U6dNgXbApFP4PMc5V4V9D1AV1HaEoQc6md +WWVquCtmVX4JEgJLc4gDUIjZEA6e9Dd6y+P6GnU= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EF3166A4B2 for ; 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=1776306679; bh=LYoLi4xgtr8s0Jsws/n+6YX7Y9ZuQjduICo+/Nie/6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nLz9fyf4XyiA9gRZLWYHdLFDpy1oy6jjDzKPzngb4Go9CZugdIpZuR7VIWov9/xI8 y/c6tBaBskxpgmDTXeFuIPAUi7Ag5pD8df9PLblgktcLUoUJ+BN0G0we14sJVdohlF M5jd3b+Fh7+xZlHuiCcNJBE9ONeCTQmeKWfrjugo= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AEB2B6A4A5; 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 zbRb-Pd-J-hO; 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=1776306674; bh=Q2YRqpHxFcsYc2NmmTI8uyoStQJCSYDX7tverLC3ewM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Himg3xU/bbftAzWKjdIsMqXMQbwUDU7yaWr1D8P+GGzbxwqhTZCkUddyWlJfYey8e frnSKJLu5Q8dvG8RxMDlD6sljwWoHB0H/17Z5UvSoDkQIjryVJXOUq2gSTQktuBShm 9eJOQp6OlYsNYMDBJrmUrqMPXSNIQ4UIvSdAi6Yo= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 728C26A4C3; Wed, 15 Apr 2026 20:31:14 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 15 Apr 2026 20:29:50 -0600 Message-ID: <20260416023021.626949-26-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: PT3XG7PLBVXYMUQIVNDU3QSRUA22CKZH X-Message-ID-Hash: PT3XG7PLBVXYMUQIVNDU3QSRUA22CKZH 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 25/33] test: dm: Free trees in ofnode_too_many() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass This test registers up to OFNODE_MULTI_TREE_MAX live trees, in a loop, to hit the -EOVERFLOW path, but never calls free_oftree() on the successfully-registered ones. Each leaks several KB per run. Free each tree after the check. Signed-off-by: Simon Glass --- test/dm/ofnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index 838a216cfa9..3fd3b8509f9 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -1379,6 +1379,7 @@ static int dm_test_ofnode_too_many(struct unit_test_state *uts) */ if (of_live_active() || i < max_trees - 1) { ut_assertok(ret); + free_oftree(tree); } else { /* * tree should be invalid when we try to register too