| Message ID | 20260316183050.3855921-14-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=1773685893; bh=sDhhst1FdrBTGV7erl3jKLnjEK+CdeA6KjWV+88EKhU=; 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=cfuPm0EhOPg7W0OOTZx4awjEwt/CzqZMOXyFa5KfyJu5SbyIq92dv+oFExdyHmo68 /M1XfHXtj4Aq4LwLosRP855WU1tO5ADOVdypp3zsuUW27NnKNkjumLjl2bCGzE5yGv DujuXhTHrJm2ZP0zAhioHkiA93p7AoJKoS9xZ+1Aam74A6KgwxsXzUxaPfurqFoNAk CqzaA3UxCWLmuxct5vgjwAFLLL77d2RY2l51xKwwm7HI8YwniqdioukDF3ogEQtCFT oERJG0x3lrCznDBdq47jxoGZNMQ1rSVhKaJlL1eEl/DL3jiJMKw2jMZW+H5kvddHA0 IEbLc8IVjL/ew== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5DB2F6A078 for <u-boot-concept@u-boot.org>; Mon, 16 Mar 2026 12:31:33 -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 VyIPbD61u6Bl for <u-boot-concept@u-boot.org>; Mon, 16 Mar 2026 12:31:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773685892; bh=sDhhst1FdrBTGV7erl3jKLnjEK+CdeA6KjWV+88EKhU=; 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=N37BbzrYSAyIBlAprNc8/bKu3XqzChMFyqM9LxTx4SolnqlbBiiaUBUsuhhCmMuv6 iNq1Fb84/nDFV8aq+HIHJX5oh9HnkLyjLVSBKJpQv9FrDvX2U8sQGT2iqDH7MWi65D IN2iAdxCifUaPle8sFJ2Ia61NP96QnjyuFZzssRiixSUdfyAIIslFnhFIgs5CEAnEv yGNvDI15BQ3cUPwrma/xMdDEvscluP4CZ3JxtqAdFGoUFo9F+HXnhTYWrsrdNrECmP /WE8HJji/klR86j52pkOb76rie9uZO3sDKuzDtpeHRKtRRFyi4hLtlCqMqhNhKg8GW VBuDAtcSrWX+g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BFBF06A081 for <u-boot-concept@u-boot.org>; Mon, 16 Mar 2026 12:31:32 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773685889; bh=+toaxAu+imt7EnMNx3zmx1rzMJzLp8Dixi19D9OxiZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=klhb/kkwoe3xz3WnXUQlo0QtZqTurz03lQpkBLD3U59p8m4UGG1ni70uftHJd1DCv SYnKHJZYNYwuBFbqGjNP96EiuPcnML2/S6m1aj+zC6g2DfnS1l3d2z5uNZx+OmpTgL Fde9c0rXlvPRMk+sGtKbsPHpn2AZ6K7VO1o/B0+YopI/i5Fe6JbGiQLG4DgFmcM5Qp Jz/EFu6wT3y35M3GpLAo/130VQ8pbJ2SjMxQzyqaDo++qN3vxmuYMKZzHHJUGS2w6B yeyq4VhcKCnToVfPBTgOf1ycZbuVivzYEYmDeVl04htR5DUSYJvIgFiIIggWRHCW/2 sGQkFMC1x4fTQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C61256A0B3; Mon, 16 Mar 2026 12:31:29 -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 AZkpflF5f7Ct; Mon, 16 Mar 2026 12:31:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773685882; bh=TIXxihfJOf7VTTmhZGgdlvnGUaOPPIJ+vDNtDL8ErnY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QuADuKVHkDcmU3LcKIeGLyLkIClYk+3PSNzhYFi9rWopjjZsBNpWYIWESYhvkRCis 3ujKAZKIyPiTJSAlsOl16YMhoeCykIDGJDZxKS3JfeUEh+UyoHtNLxOjsLxibho2OC ENdD6d0xxAuc6b7Avb395p+sNyOcsa7Wvzq3UdI51gz1naitnIGdfCE6BGQq2tbjJf ivr0f6uj9lHjtVg+tK/D84bPMBvlqBRphKyUecfzB9qmtn+/wpylnmZqnYla5eXGY7 wkKR/nMoD7aTmslsfy/woUcM1LcpfrUmau0qtuW2QNUjlcxumkSXUUzwAl+ehOYFAs HhAfOqhIM2rWg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6BC9E6A09E; Mon, 16 Mar 2026 12:31:22 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Mon, 16 Mar 2026 12:30:36 -0600 Message-ID: <20260316183050.3855921-14-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260316183050.3855921-1-sjg@u-boot.org> References: <20260316183050.3855921-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 3KXLSJ73JHJJUJXW4KTNCIIVXEIHMTAV X-Message-ID-Hash: 3KXLSJ73JHJJUJXW4KTNCIIVXEIHMTAV 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 13/17] mtd: spi: Fix device name leak in sandbox SPI flash emulator 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/3KXLSJ73JHJJUJXW4KTNCIIVXEIHMTAV/> 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 |
Add automatic memory-leak detection to U-Boot tests
|
|
Commit Message
Simon Glass
March 16, 2026, 6:30 p.m. UTC
From: Simon Glass <sjg@chromium.org> sandbox_sf_bind_emul() allocates a device name with strdup() but does not mark it with DM_FLAG_NAME_ALLOCED, so device_unbind() never frees it. Add the missing device_set_name_alloced() call. Fixes: b6c2956defb4 ("dm: sf: sandbox: Convert SPI flash driver to driver model") Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/mtd/spi/sandbox.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index 0b56312bb85..573ce463294 100644 --- a/drivers/mtd/spi/sandbox.c +++ b/drivers/mtd/spi/sandbox.c @@ -553,6 +553,7 @@ int sandbox_sf_bind_emul(struct sandbox_state *state, int busnum, int cs, spec, ret); return ret; } + device_set_name_alloced(emul); state->spi[busnum][cs].emul = emul; return 0;