From 006f6460a9d5b785654f122b5b05937149cc0729 Mon Sep 17 00:00:00 2001 From: Amir Shalem Date: Sun, 29 Jul 2018 14:02:27 -0700 Subject: [PATCH] Deallocate the YogaConfig memory with correct method Summary: We've mistakenly used `free()` to free the memory, where `delete` should have been used Reviewed By: davidaurelio Differential Revision: D9042347 fbshipit-source-id: e15cec0f498409066521a6de1e3fe4b7404ec46c --- yoga/Yoga.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index b9a5f781..a05ff852 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -369,7 +369,7 @@ YGConfigRef YGConfigNew(void) { } void YGConfigFree(const YGConfigRef config) { - free(config); + delete config; gConfigInstanceCount--; }