From b63b94a4151e5adaa957ff9800ed70ae630f3379 Mon Sep 17 00:00:00 2001 From: zyg Date: Tue, 14 Sep 2021 21:23:31 +0800 Subject: [PATCH] fix memory leak --- src/shape.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shape.c b/src/shape.c index 7533342f..3094a4bb 100644 --- a/src/shape.c +++ b/src/shape.c @@ -61,6 +61,7 @@ void shp_font_free(shp_typ *shp_font){ current = next_shp; } } + free(shp_font); } } @@ -1043,4 +1044,4 @@ int shp_parse_str(shp_typ *font, list_node *list_ret, int pool_idx, char *txt, d } if (w != NULL) *w = ofs_x; /* return the text width*/ return num_graph; -} \ No newline at end of file +}