From 73340247bd316addb8530e4449288c3f338a7134 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 14 Nov 2018 16:40:43 +0900 Subject: [PATCH] lottieitem: free alloc memory properly. gradient stops must be freed. Change-Id: Ibc25e8e8e1c59762c0b757d15897a8ca5adf1f24 --- src/lottie/lottieitem.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lottie/lottieitem.h b/src/lottie/lottieitem.h index 364da41..7cdf5fe 100644 --- a/src/lottie/lottieitem.h +++ b/src/lottie/lottieitem.h @@ -160,6 +160,11 @@ public: void sync(); public: std::unique_ptr mCNode; + + ~LOTDrawable() { + if (mCNode.get()->mGradient.stopCount > 0) + free(mCNode.get()->mGradient.stopPtr); + } }; class LOTPathDataItem; -- 2.7.4