common paint: fix a memory leak.
authorHermet Park <chuneon.park@samsung.com>
Tue, 9 Nov 2021 05:32:04 +0000 (14:32 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Wed, 10 Nov 2021 01:43:08 +0000 (10:43 +0900)
commit930112837e02b69228ffb3af711cef3e6fd109dc
treeee1a6bdf55831e0ca6c1d0e4f94da05a6a352e9d
parentd42d165bb72535bca6344fdb63880b79669cee86
common paint: fix a memory leak.

delete dangling object properly in the corner case.

Unfortunately, this brings to correct the capi test cases.
we assume the paints is deleted whenever its result is successful or not.

@Issue: https://github.com/Samsung/thorvg/issues/995
src/lib/tvgPaint.cpp
test/capi/capiPaint.cpp