[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] anuj-distance-field dc8eaa4 42/95: * src/sdf/ftsdf.c (split_
From: |
Anuj Verma |
Subject: |
[freetype2] anuj-distance-field dc8eaa4 42/95: * src/sdf/ftsdf.c (split_sdf_shape): Memory leak. |
Date: |
Sun, 2 Aug 2020 01:10:32 -0400 (EDT) |
branch: anuj-distance-field
commit dc8eaa47450a36af82bc896736a6c4729fa17fe9
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>
* 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.
---
[GSoC]ChangeLog | 6 ++++++
src/sdf/ftsdf.c | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog
index 12194c6..baa8995 100644
--- a/[GSoC]ChangeLog
+++ b/[GSoC]ChangeLog
@@ -1,5 +1,11 @@
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.
* src/sdf/ftsdf.c (split_conic, split_sdf_conic):
diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index 0fa0bcc..e8b82bf 100644
--- a/src/sdf/ftsdf.c
+++ b/src/sdf/ftsdf.c
@@ -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 ) );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] anuj-distance-field dc8eaa4 42/95: * src/sdf/ftsdf.c (split_sdf_shape): Memory leak.,
Anuj Verma <=