* src/sdf/ftsdf.c (split_sdf_shape): Memory leak.

* src/sdf/ftsdf.c (split_sdf_shape): Memory leak.
  After recursion the edges variable becomes `NULL'
  so reassign it to deallocate the list completely.
This commit is contained in:
Anuj Verma 2020-07-08 16:58:07 +05:30 committed by anujverma
parent 470d02aa60
commit 90abe41ead
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2020-07-08 Anuj Verma <anujv@iitbhilai.ac.in>
* src/sdf/ftsdf.c (split_sdf_shape): Memory leak.
After recursion the edges variable becomes `NULL'
so reassign it to deallocate the list completely.
2020-07-08 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Added functions to subdivide a conic curve.

View File

@ -824,6 +824,8 @@
edges.head = edges.head->next;
}
edges = ((SDF_Contour*)contours.head->data)->edges;
/* Deallocate the previous list of edges and */
/* assign the newly created list to the contour. */
FT_List_Finalize( &edges, sdf_edge_destructor, memory, NULL );
@ -2712,6 +2714,8 @@
FT_CALL( sdf_outline_decompose( outline, shape ) );
split_sdf_shape( shape );
FT_CALL( sdf_generate_bounding_box( shape, sdf_params->spread,
sdf_params->root.target ) );