You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
ffmpeg_vdpau: Free ctx on error path
Fixes CID1355118 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user