d2d1: Fix double free bug when d2d_geometry_sink_Close fails.
geometry->fill.bezier_vertices was being freed on the failed path in d2d_geometry_sink_Close and then again when the path geometry was released (in d2d_geometry_cleanup). By setting it to NULL after freeing it initially, all other calls to free it are a no-op.
This commit is contained in:
parent
6d8489a0bb
commit
1e79217fb0
1 changed files with 1 additions and 0 deletions
|
@ -3247,6 +3247,7 @@ done:
|
|||
if (FAILED(hr))
|
||||
{
|
||||
free(geometry->fill.bezier_vertices);
|
||||
geometry->fill.bezier_vertices = NULL;
|
||||
geometry->fill.bezier_vertex_count = 0;
|
||||
d2d_path_geometry_free_figures(geometry);
|
||||
geometry->u.path.state = D2D_GEOMETRY_STATE_ERROR;
|
||||
|
|
Loading…
Add table
Reference in a new issue