Commit d889ae33 authored by James Almer's avatar James Almer

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: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent eaf3c4b8
......@@ -47,7 +47,8 @@ void av_bsf_free(AVBSFContext **pctx)
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->priv_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment