Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2021-03-12 03:27:25 +0300
committerGitHub <noreply@github.com>2021-03-12 03:27:25 +0300
commitcb362391c286d861a8bb7a172e6355c304ab18fe (patch)
treed4a935eaac758a91da7855bb142e668314169adb /src/coreclr/pal
parent7e49088a11c0c6eaa6a27ff5101dbd9ed27d2b7c (diff)
Remote unwinder's put_unwind_info function needs to cleanup for FEATURE_USE_SYSTEM_LIBUNWIND (#49444)
Fixes issue: https://github.com/dotnet/runtime/issues/42561
Diffstat (limited to 'src/coreclr/pal')
-rw-r--r--src/coreclr/pal/src/exception/remote-unwind.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/coreclr/pal/src/exception/remote-unwind.cpp b/src/coreclr/pal/src/exception/remote-unwind.cpp
index aff77f2e79a..5bdf10e6764 100644
--- a/src/coreclr/pal/src/exception/remote-unwind.cpp
+++ b/src/coreclr/pal/src/exception/remote-unwind.cpp
@@ -1973,6 +1973,12 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pip, int nee
static void
put_unwind_info(unw_addr_space_t as, unw_proc_info_t *pip, void *arg)
{
+#ifdef FEATURE_USE_SYSTEM_LIBUNWIND
+ if (pip->unwind_info != nullptr) {
+ free(pip->unwind_info);
+ pip->unwind_info = nullptr;
+ }
+#endif // FEATURE_USE_SYSTEM_LIBUNWIND
}
static unw_accessors_t init_unwind_accessors()