[Bug-fix] Remove redundant free on exception object.
__cxa_decrement_exception_refcount should not call exceptionDestructor()
directly, since __cxa_free_exception will do that.
Change-Id: I6ccfd66d21e08abbba15c704edef980a0cb769fc
Signed-off-by: WenHan Gu <Wenhan.gu@mediatek.com>
diff --git a/sources/cxx-stl/gabi++/src/cxxabi.cc b/sources/cxx-stl/gabi++/src/cxxabi.cc
index b5f1928..1a51224 100644
--- a/sources/cxx-stl/gabi++/src/cxxabi.cc
+++ b/sources/cxx-stl/gabi++/src/cxxabi.cc
@@ -282,11 +282,8 @@
{
__cxa_exception* header =
reinterpret_cast<__cxa_exception*>(exceptionObject)-1;
- if (__sync_sub_and_fetch(&header->referenceCount, 1) == 0) {
- if (header->exceptionDestructor)
- header->exceptionDestructor(exceptionObject);
+ if (__sync_sub_and_fetch(&header->referenceCount, 1) == 0)
__cxa_free_exception(exceptionObject);
- }
}
}