Commit 1e79217f authored by Brendan McGrath's avatar Brendan McGrath Committed by Alexandre Julliard

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.
parent 6d8489a0
...@@ -3247,6 +3247,7 @@ done: ...@@ -3247,6 +3247,7 @@ done:
if (FAILED(hr)) if (FAILED(hr))
{ {
free(geometry->fill.bezier_vertices); free(geometry->fill.bezier_vertices);
geometry->fill.bezier_vertices = NULL;
geometry->fill.bezier_vertex_count = 0; geometry->fill.bezier_vertex_count = 0;
d2d_path_geometry_free_figures(geometry); d2d_path_geometry_free_figures(geometry);
geometry->u.path.state = D2D_GEOMETRY_STATE_ERROR; geometry->u.path.state = D2D_GEOMETRY_STATE_ERROR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment