[PATCH v2 3/6] ASoC: topology: Check return value of soc_tplg_*_create
Amadeusz Sławiński
amadeuszx.slawinski at linux.intel.com
Mon Mar 30 18:10:43 CEST 2020
>>> Sounds good, but this happens in a loop, so would all the memory
>>> previously allocated by denum/dbytes/dmixer_create leak, or is it
>>> freed automatically somewhere else?
>>>
>>
>> Well, now that error is propagated, snd_soc_tplg_component_remove()
>> should be called by snd_soc_tplg_component_load() in case of errors
>> while parsing. From quick look it seems like it should be able to free
>> it up correctly by calling remove_enum/bytes/mixer.
>
> I am not sure what you meant by 'should be called', if it's a
> recommendation for a future change or a description of the existing
> behavior.
> Just to be clear, are you saying the existing code will take care of
> this error flow or that a new patch is needed?
Existing code should handle this properly.
No new code is needed.
More information about the Alsa-devel
mailing list