Paul B Mahol:
> On Mon, Sep 14, 2020 at 07:27:25AM +0200, Andreas Rheinhardt wrote:
>> The init function of the ALAC encoder calls its own close function
>> if a call to ff_lpc_init() fails; yet nothing has been allocated before
>> that point (except extradata which is freed generically) and ff_lpc_init()
>> can be expected to clean up after itself on error (the documentation does
>> not say anything to the contrary and the current implementation can only
>> fail if the only allocation fails, so there is nothing to clean up on
>> error anyway), so this is unnecessary.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>
>> ---
>>  libavcodec/alacenc.c | 20 ++++++--------------
>>  1 file changed, 6 insertions(+), 14 deletions(-)
>>
> 
> what about adding cleanup flag so if new stuff is added(unlikely) new bugs
> wont pop up?
> 

That is possible, but as you said yourself: It is unlikely that new
stuff will be added. Furthermore, I think that whoever adds new stuff
would be responsible to make sure that it is free of leaks.

- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to