mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/bsf: check that AVBSFInternal was allocated before dereferencing it
This can happen when av_bsf_free() is called on av_bsf_alloc() failure. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit d889ae33962e4ad2b24175418fe89d72ce712179)
This commit is contained in:
parent
4a79f30d77
commit
693f3926dd
@ -47,7 +47,8 @@ void av_bsf_free(AVBSFContext **pctx)
|
|||||||
|
|
||||||
av_opt_free(ctx);
|
av_opt_free(ctx);
|
||||||
|
|
||||||
av_packet_free(&ctx->internal->buffer_pkt);
|
if (ctx->internal)
|
||||||
|
av_packet_free(&ctx->internal->buffer_pkt);
|
||||||
av_freep(&ctx->internal);
|
av_freep(&ctx->internal);
|
||||||
av_freep(&ctx->priv_data);
|
av_freep(&ctx->priv_data);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user