diff options
author | Amadeusz Sławiński <[email protected]> | 2023-09-29 12:32:43 +0200 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-09-29 14:17:49 +0200 |
commit | dd9f9cc1e6b9391140afa5cf27bb47c9e2a08d02 (patch) | |
tree | 234e190c79d6e8295713e620a0cc7f68b7ee4cab /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | e80f238d2bc0c0f27dc52ac824ca80b938a43ace (diff) |
ASoC: core: Do not call link_exit() on uninitialized rtd objects
On init we have sequence:
for_each_card_prelinks(card, i, dai_link) {
ret = snd_soc_add_pcm_runtime(card, dai_link);
ret = init_some_other_things(...);
if (ret)
goto probe_end:
for_each_card_rtds(card, rtd) {
ret = soc_init_pcm_runtime(card, rtd);
probe_end:
while on exit:
for_each_card_rtds(card, rtd)
snd_soc_link_exit(rtd);
If init_some_other_things() step fails due to error we end up with
not fully setup rtds and try to call snd_soc_link_exit on them, which
depending on contents on .link_exit handler, can end up dereferencing
NULL pointer.
Reviewed-by: Cezary Rojewski <[email protected]>
Signed-off-by: Amadeusz Sławiński <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions