[vlc-commits] direct3d11: fix double free in region pictures
Steve Lhomme
git at videolan.org
Tue Dec 18 13:49:16 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Dec 18 13:46:53 2018 +0100| [b0ab406fffda4ac98f550faf392976bf32f1f38b] | committer: Steve Lhomme
direct3d11: fix double free in region pictures
Since e6f89b02c75600250cb2eba809caaff7cc4fe53e
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b0ab406fffda4ac98f550faf392976bf32f1f38b
---
modules/video_output/win32/direct3d11.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 4489131ae5..6503ce1384 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1683,7 +1683,6 @@ static void Direct3D11DeleteRegions(int count, picture_t **region)
static void DestroyPictureQuad(picture_t *p_picture)
{
D3D11_ReleaseQuad( (d3d_quad_t *) p_picture->p_sys );
- free( p_picture );
}
static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_count,
@@ -1720,7 +1719,7 @@ static int Direct3D11MapSubpicture(vout_display_t *vd, int *subpicture_region_co
texDesc.Width == r->p_picture->format.i_width &&
texDesc.Height == r->p_picture->format.i_height) {
(*region)[i] = cache;
- memset(&sys->d3dregions[j], 0, sizeof(cache)); // do not reuse this cached value
+ memset(&sys->d3dregions[j], 0, sizeof(cache)); // do not reuse this cached value a second time
break;
}
}
More information about the vlc-commits
mailing list