You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
fftools/textformat/avtextformat: Fix segfault upon allocation error
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -590,10 +590,12 @@ int avtextwriter_context_close(AVTextWriterContext **pwctx)
|
|||||||
if (!wctx)
|
if (!wctx)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
if (wctx->writer->uninit)
|
if (wctx->writer) {
|
||||||
wctx->writer->uninit(wctx);
|
if (wctx->writer->uninit)
|
||||||
if (wctx->writer->priv_class)
|
wctx->writer->uninit(wctx);
|
||||||
av_opt_free(wctx->priv);
|
if (wctx->writer->priv_class)
|
||||||
|
av_opt_free(wctx->priv);
|
||||||
|
}
|
||||||
av_freep(&wctx->priv);
|
av_freep(&wctx->priv);
|
||||||
av_freep(pwctx);
|
av_freep(pwctx);
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user