> On Aug 8, 2025, at 19:07, Nicolas George <[email protected]> wrote:
>
> Jiasheng Jiang (HE12025-08-08):
>> I found that after the success of avio_alloc_context(), buffer is
>> assigned to rtp_ctx->pb->buffer and will be freed in whip_deinit().
>> Therefore, I think moving av_freep() after end would cause a double
>> free.
>
> Indeed, you are right, I had not checked that.
>
> With your change, if somebody adds an extra operation that might fail
> between allocating the buffer and using it in the avio context. It might
> be better to free the buffer at the end and set it to NULL if
> avio_alloc_context() succeeds to avoid the double free, but that is very
> minor.
Hi Nicolas,
I guess this patch https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21069 is what
you described.
Thanks for your helpful suggestion!
>
> So no objection to the patch, just take half a second considering my
> suggestion.
>
> Regards,
>
> --
> Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> [email protected]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe".
Best Regards,
Jack
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]