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; -- 2.43.0