summaryrefslogtreecommitdiff
path: root/src/gc
diff options
context:
space:
mode:
authorOmair Majid <omajid@redhat.com>2019-04-16 10:43:09 -0400
committerJan Kotas <jkotas@microsoft.com>2019-04-16 07:43:09 -0700
commitbef5dd6507f2e8ac163941646ef9936d6ced3715 (patch)
treef467490575b736b9d640854bd4d25e68ec8adfa2 /src/gc
parentf7020d98c49d8c89fdad41aae64c018be63c623a (diff)
downloadcoreclr-bef5dd6507f2e8ac163941646ef9936d6ced3715.tar.gz
coreclr-bef5dd6507f2e8ac163941646ef9936d6ced3715.tar.bz2
coreclr-bef5dd6507f2e8ac163941646ef9936d6ced3715.zip
Use delete [] on array types (#24027)
Calling delete on types allocated with new[] leads to undefined behaviour.
Diffstat (limited to 'src/gc')
-rw-r--r--src/gc/gc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp
index d47f714ec9..9e0356b5ff 100644
--- a/src/gc/gc.cpp
+++ b/src/gc/gc.cpp
@@ -19305,7 +19305,7 @@ recheck:
uint8_t** tmp = new (nothrow) uint8_t* [new_size];
if (tmp)
{
- delete background_mark_stack_array;
+ delete [] background_mark_stack_array;
background_mark_stack_array = tmp;
background_mark_stack_array_length = new_size;
background_mark_stack_tos = background_mark_stack_array;