[FFmpeg-devel] [PATCH 4/4] avformat/sapenc: fix leak in sap_write_header()
ld y
yldhome2d2 at gmail.com
Mon Jun 23 15:54:24 EEST 2025
Michael Niedermayer <michael at niedermayer.cc> writes:
> this can be factored like:
>
> like
> + ret = 0;
> fail:
> + for (i = 0; i < s->nb_streams; i++)
> + if (contexts[i])
> + av_free(contexts[i]->url);
> av_free(contexts);
> + if (ret < 0)
> sap_write_close(s);
>
Yeah this looks much better. I will use it in my v2 patch.
One more question, would it be ok to rename fail label to end label.
I'm not sure if it's worth the change, though.
Thanks,
Lidong
More information about the ffmpeg-devel
mailing list