ffmpeg_vdpau: Free ctx on error path

Fixes CID1355118

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/189/head
Michael Niedermayer 9 years ago
parent 50208a0424
commit ba687ae0bd
  1. 4
      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;

Loading…
Cancel
Save