forked from minhngoc25a/freetype2
* src/sdf/ftsdf.c (sdf_generate_coarse_grid): Memory leak.
Release the allocated lists for the coarse grid after we are done using them.
This commit is contained in:
parent
80c5bed575
commit
2afa0cb369
|
@ -1,3 +1,10 @@
|
|||
2020-07-11 Anuj Verma <anujv@iitbhilai.ac.in>
|
||||
|
||||
* src/sdf/ftsdf.c (sdf_generate_coarse_grid): Memory leak.
|
||||
|
||||
Release the allocated lists for the coarse grid after
|
||||
we are done using them.
|
||||
|
||||
2020-07-11 Anuj Verma <anujv@iitbhilai.ac.in>
|
||||
|
||||
[sdf] Completed the coarse grid optimization.
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
/* then they will be checked for corner if they have ambiguity. */
|
||||
#define CORNER_CHECK_EPSILON 32
|
||||
|
||||
#define CG_DIMEN 10
|
||||
#define CG_DIMEN 8
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
|
@ -2909,6 +2909,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* release the allocated lists */
|
||||
for ( i = 0; i < CG_DIMEN * CG_DIMEN; i++ )
|
||||
{
|
||||
SDF_Edge* edge = coarse_grid[i];
|
||||
SDF_Edge* temp;
|
||||
|
||||
|
||||
while ( edge )
|
||||
{
|
||||
temp = edge;
|
||||
edge = edge->next;
|
||||
|
||||
sdf_edge_done( memory, &temp );
|
||||
}
|
||||
|
||||
coarse_grid[i] = NULL;
|
||||
}
|
||||
|
||||
Exit:
|
||||
return error;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue