Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.

Commit

Permalink
Remove a call to new[] from WriteDSODebugStream
Browse files Browse the repository at this point in the history
R=mark at https://breakpad.appspot.com/523002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1107 4c0a9323-5329-0410-9bdc-e9ce6186880e
  • Loading branch information
ted.mielczarek@gmail.com committed Jan 31, 2013
1 parent 248c84d commit 5eb7c92
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/client/linux/minidump_writer/minidump_writer.cc
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5eb7c92

Please sign in to comment.