diff options
Diffstat (limited to 'contrib/libstdc++/libsupc++/eh_globals.cc')
-rw-r--r-- | contrib/libstdc++/libsupc++/eh_globals.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/libstdc++/libsupc++/eh_globals.cc b/contrib/libstdc++/libsupc++/eh_globals.cc index 4276022..66971fe 100644 --- a/contrib/libstdc++/libsupc++/eh_globals.cc +++ b/contrib/libstdc++/libsupc++/eh_globals.cc @@ -48,7 +48,17 @@ static void get_globals_dtor (void *ptr) { if (ptr) - std::free (ptr); + { + __cxa_exception *exn, *next; + exn = ((__cxa_eh_globals *) ptr)->caughtExceptions; + while (exn) + { + next = exn->nextException; + _Unwind_DeleteException (&exn->unwindHeader); + exn = next; + } + std::free (ptr); + } } static void |