diff options
| author | Yang Yingliang <[email protected]> | 2022-10-27 01:34:38 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2022-10-27 06:27:39 +0000 |
| commit | 4a4c8482e370d697738a78dcd7bf2780832cb712 (patch) | |
| tree | 8500aa6cf1093f42e260ea909c5285fa3949ac1a /tools/lib/api/fs/tracing_path.c | |
| parent | Merge tag 'asoc-fix-v6.1-rc2' of https://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
| download | kernel-4a4c8482e370d697738a78dcd7bf2780832cb712.tar.gz kernel-4a4c8482e370d697738a78dcd7bf2780832cb712.zip | |
ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()
dev_set_name() in soundbus_add_one() allocates memory for name, it need be
freed when of_device_register() fails, call soundbus_dev_put() to give up
the reference that hold in device_initialize(), so that it can be freed in
kobject_cleanup() when the refcount hit to 0. And other resources are also
freed in i2sbus_release_dev(), so it can return 0 directly.
Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")
Signed-off-by: Yang Yingliang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
0 files changed, 0 insertions, 0 deletions
