mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avutil/hwcontext_d3d11va: Free AVD3D11FrameDescriptor on error
Fixes: CID1598558 Resource leak
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Steve Lhomme <robux4@ycbcr.xyz>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cf22f944d5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f55dbd882f
commit
ea48c665d1
@ -172,6 +172,7 @@ static AVBufferRef *wrap_texture_buf(AVHWFramesContext *ctx, ID3D11Texture2D *te
|
||||
sizeof(*frames_hwctx->texture_infos));
|
||||
if (!frames_hwctx->texture_infos) {
|
||||
ID3D11Texture2D_Release(tex);
|
||||
av_free(desc);
|
||||
return NULL;
|
||||
}
|
||||
s->nb_surfaces = s->nb_surfaces_used + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user