From 7ee25cd78334a24bb6b465ae5db46bb4dbf403cb Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 3 Jun 2020 11:15:40 +0900 Subject: [PATCH] sw_engine: fix mistached c style alloc/free these are allocated by c style mem alloc. Thus, they should be freed with free() Change-Id: I320fff4d5a5bce2374ace6495a9f96c3e1034cfc --- src/lib/sw_engine/tvgSwStroke.cpp | 1 + src/lib/tvgShapePath.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/sw_engine/tvgSwStroke.cpp b/src/lib/sw_engine/tvgSwStroke.cpp index e048ff53..be18e05a 100644 --- a/src/lib/sw_engine/tvgSwStroke.cpp +++ b/src/lib/sw_engine/tvgSwStroke.cpp @@ -838,6 +838,7 @@ void strokeReset(SwStroke& stroke, float width, StrokeCap cap, StrokeJoin join) stroke.borders[1].valid = false; } + bool strokeParseOutline(SwStroke& stroke, SwOutline& outline) { uint32_t first = 0; diff --git a/src/lib/tvgShapePath.h b/src/lib/tvgShapePath.h index 68205f48..7e020e8b 100644 --- a/src/lib/tvgShapePath.h +++ b/src/lib/tvgShapePath.h @@ -36,8 +36,8 @@ struct ShapePath ~ShapePath() { - if (cmds) delete(cmds); - if (pts) delete(pts); + if (cmds) free(cmds); + if (pts) free(pts); } void reserveCmd(size_t cmdCnt)