[FFmpeg-devel] [PATCH 3/7] avformat/icecast: Free the right buffer on error

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Fri Dec 20 00:36:00 EET 2019


Michael Niedermayer:
> On Sun, Nov 10, 2019 at 05:07:29AM +0100, Andreas Rheinhardt wrote:
>> In case an AVBPrint was not complete, icecast_open() would free some
>> buffers that have not been allocated yet instead of freeing the data of
>> the AVBPrint (if they have been allocated). Because this error does not
>> trigger a jump to the general cleanup section any more, one can moreover
>> remove a (now unnecessary) initialization of a pointer.
>>
>> Furthermore, finalizing an AVBPrint can fail (namely when the string
>> inside the AVBPrint has not been allocated yet) and so this needs to be
>> checked.
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
>> ---
>>  libavformat/icecast.c | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> will apply
> 
> thx
> 
> [...]
> 
Thanks. Can you also take a look at the follow-up patch [1]?

- Andreas

[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2019-November/252778.html



More information about the ffmpeg-devel mailing list