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
b220f7dc94
commit
00c45302e7
1 changed files with 1 additions and 0 deletions
|
|
@ -184,6 +184,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…
Add table
Add a link
Reference in a new issue