aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/linux/minidump_writer')
-rw-r--r--src/client/linux/minidump_writer/minidump_writer.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc
index 6b6a2c0d..92632014 100644
--- a/src/client/linux/minidump_writer/minidump_writer.cc
+++ b/src/client/linux/minidump_writer/minidump_writer.cc
@@ -1144,11 +1144,10 @@ class MinidumpWriter {
debug.get()->ldbase = (void*)debug_entry.r_ldbase;
debug.get()->dynamic = dynamic;
- char* dso_debug_data = new char[dynamic_length];
- dumper_->CopyFromProcess(dso_debug_data, GetCrashThread(), dynamic,
+ wasteful_vector<char> dso_debug_data(dumper_->allocator(), dynamic_length);
+ dumper_->CopyFromProcess(&dso_debug_data[0], GetCrashThread(), dynamic,
dynamic_length);
- debug.CopyIndexAfterObject(0, dso_debug_data, dynamic_length);
- delete[] dso_debug_data;
+ debug.CopyIndexAfterObject(0, &dso_debug_data[0], dynamic_length);
return true;
}