Commit ba687ae0 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg_vdpau: Free ctx on error path

Fixes CID1355118
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 50208a04
......@@ -126,8 +126,10 @@ static int vdpau_alloc(AVCodecContext *s)
return AVERROR(ENOMEM);
device_priv = av_mallocz(sizeof(*device_priv));
if (!device_priv)
if (!device_priv) {
av_freep(&ctx);
goto fail;
}
ist->hwaccel_ctx = ctx;
ist->hwaccel_uninit = vdpau_uninit;
......
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