X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg_vdpau.c;h=cf2e83e8a3f58cacae643cf316409227f9cd2cb3;hb=acc155ac55baa95d1c16c0364b02244bc04d83a8;hp=59a5f701213f01333e93a7f39bf798e60a6ab313;hpb=8fd5342463b07fdfe2f6e89620182380c1c10ab8;p=ffmpeg diff --git a/ffmpeg_vdpau.c b/ffmpeg_vdpau.c index 59a5f701213..cf2e83e8a3f 100644 --- a/ffmpeg_vdpau.c +++ b/ffmpeg_vdpau.c @@ -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;