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>
This commit is contained in:
Michael Niedermayer 2024-06-09 17:47:42 +02:00
parent 698ed0d5a5
commit cf22f944d5
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,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;