mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
ffmpeg_vdpau: Free ctx on error path
Fixes CID1355118 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
50208a0424
commit
ba687ae0bd
@ -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…
Reference in New Issue
Block a user