sw_engine: fix mistached c style alloc/free 24/235224/1
authorHermet Park <chuneon.park@samsung.com>
Wed, 3 Jun 2020 02:15:40 +0000 (11:15 +0900)
committerHermet Park <chuneon.park@samsung.com>
Wed, 3 Jun 2020 02:15:40 +0000 (11:15 +0900)
these are allocated by c style mem alloc.
Thus, they should be freed with free()

Change-Id: I320fff4d5a5bce2374ace6495a9f96c3e1034cfc

src/lib/sw_engine/tvgSwStroke.cpp
src/lib/tvgShapePath.h

index e048ff5..be18e05 100644 (file)
@@ -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;
index 68205f4..7e020e8 100644 (file)
@@ -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)