| Message ID | 20260416023021.626949-11-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=1776306662; bh=wbonAHMkWZLojjytSgGmFd+xg5lR2sVy25Oa8kTNGrM=; 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=ZBy/ZiGTLBusFlX9VcorNwWmrtMaZOmfp9Vt0dBbwzRp6UnCxmBGho8nVI4UVR4J0 03fFPZUToommcXKkH/pAYuL1bFUdpiZ3NARuSX9H65P2hmBsp7H9TyYkGJgJtz+nJq 14o/R/LaNDmC9VTsw4ZPuvmTIhBDcPyi6WfYSNwQ= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1C2B36A4A6 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:02 -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 pjLUmVy46GFm for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:02 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306660; bh=wbonAHMkWZLojjytSgGmFd+xg5lR2sVy25Oa8kTNGrM=; 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=dDRpmpcGahD9NKqVD6euzgjnQu1B+TipWLVTSQ6OY6QFYOW0Du57GqXzQiGTTtYnU gKNOE3a6dLZz5oR0pYj3KyQGJTGwFvXuGhMWew9h23iYnvOhOGFuyTkZApDSeT2vL/ MwQbf0uH6DeEUKrLm2pjnRbvChrEzgFJl1IN7guc= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1AB786A4A7 for <u-boot-concept@u-boot.org>; Wed, 15 Apr 2026 20:31:00 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306657; bh=/+UyWOwuRFFzpYZo0IS7JbiPTx3dkR6/hdxSKZchSUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DQS76uogHlCSBor31B4PsyjPXx2AQNWrwBZRi2P1VjsSAEgC3Yw/SK9GD3PidtZgl ZFfxLvee5OL578tzz0fUl3sO77v2WHOvOjkvTEq2J6KT2fFYYaQIZ9xZETzxh7I7ZE 1yh9BIxXL+ypw1upT7g8/f9kTAuxCrbMH9BZBAPg= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 78BDB6A4A0; Wed, 15 Apr 2026 20:30:57 -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 iD9os9pcOt65; Wed, 15 Apr 2026 20:30:57 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776306657; bh=qHXaQ73AAbe5B7Cl4mIykWruXfD34tu+qoMitrOpKMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZKCPvzk51zBKiYVGi2HZhSQB8XPHTY0NFQQw8pqOnLjbjPX+kSfcCZh2ZfU6FQQnZ ZlLf4EfgIaE1m36WUzgWJkRq8sUyzzENPEWfimJxDdc9INxCM82E5TySwCE1THGffX STmq2XcJq574tPFpGaaaNp8Y2K09vg1O0LBEeSx8= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id EFAC16A44C; Wed, 15 Apr 2026 20:30:56 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 15 Apr 2026 20:29:35 -0600 Message-ID: <20260416023021.626949-11-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: PYGFFCFPBIDFV6TC346GDLOPLBU5NIUX X-Message-ID-Hash: PYGFFCFPBIDFV6TC346GDLOPLBU5NIUX 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 10/33] blk: Mark partition name as alloced 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/PYGFFCFPBIDFV6TC346GDLOPLBU5NIUX/> 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> part_create_block_devices() allocates a name for the block-partition driver, but device_bind_driver() does not set DM_FLAG_NAME_ALLOCED, so the name is not released when the partition device is unbound. Every scanned partition thus leaks its name. Call device_set_name_alloced() so the core frees it on unbind. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/block/blk-uclass.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 9c9169d6ac8..611859435f2 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -808,6 +808,7 @@ static int part_create_block_devices(struct udevice *blk_dev) strdup(devname), &dev); if (ret) return ret; + device_set_name_alloced(dev); part_data = dev_get_uclass_plat(dev); part_data->partnum = part;