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:
parent
698ed0d5a5
commit
cf22f944d5
@ -190,6 +190,7 @@ static AVBufferRef *wrap_texture_buf(AVHWFramesContext *ctx, ID3D11Texture2D *te
|
|||||||
sizeof(*frames_hwctx->texture_infos));
|
sizeof(*frames_hwctx->texture_infos));
|
||||||
if (!frames_hwctx->texture_infos) {
|
if (!frames_hwctx->texture_infos) {
|
||||||
ID3D11Texture2D_Release(tex);
|
ID3D11Texture2D_Release(tex);
|
||||||
|
av_free(desc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
s->nb_surfaces = s->nb_surfaces_used + 1;
|
s->nb_surfaces = s->nb_surfaces_used + 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user