diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-03-03 15:48:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-03-03 16:41:11 +0100 |
commit | ba687ae0bdd168332261853a965576bc78c4f7e0 (patch) | |
tree | d25b8d355e9daf2bbaf7a179eaa01197bac9dd69 /ffmpeg_vdpau.c | |
parent | 50208a0424fa1edbab9f325af0091498a65b8b96 (diff) | |
download | ffmpeg-ba687ae0bdd168332261853a965576bc78c4f7e0.tar.gz |
ffmpeg_vdpau: Free ctx on error path
Fixes CID1355118
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffmpeg_vdpau.c')
-rw-r--r-- | ffmpeg_vdpau.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg_vdpau.c b/ffmpeg_vdpau.c index 59a5f70121..cf2e83e8a3 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; |