提交 ba687ae0 编写于 作者: M Michael Niedermayer

ffmpeg_vdpau: Free ctx on error path

Fixes CID1355118
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 50208a04
...@@ -126,8 +126,10 @@ static int vdpau_alloc(AVCodecContext *s) ...@@ -126,8 +126,10 @@ static int vdpau_alloc(AVCodecContext *s)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
device_priv = av_mallocz(sizeof(*device_priv)); device_priv = av_mallocz(sizeof(*device_priv));
if (!device_priv) if (!device_priv) {
av_freep(&ctx);
goto fail; goto fail;
}
ist->hwaccel_ctx = ctx; ist->hwaccel_ctx = ctx;
ist->hwaccel_uninit = vdpau_uninit; ist->hwaccel_uninit = vdpau_uninit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册