Skip to content

Commit

Permalink
vo_libmpv: fix null pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
wnoun committed Mar 7, 2019
1 parent 89eacf8 commit 865657d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions video/out/vo_libmpv.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,11 @@ void mpv_render_context_free(mpv_render_context *ctx)

forget_frames(ctx, true);

ctx->renderer->fns->destroy(ctx->renderer);
talloc_free(ctx->renderer->priv);
talloc_free(ctx->renderer);
if (ctx->renderer) {
ctx->renderer->fns->destroy(ctx->renderer);
talloc_free(ctx->renderer->priv);
talloc_free(ctx->renderer);
}
talloc_free(ctx->dr);
talloc_free(ctx->dispatch);

Expand Down

0 comments on commit 865657d

Please sign in to comment.