Chromium Code Reviews| Index: runtime/vm/benchmark_test.cc |
| diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc |
| index db3bfc434ae1a661c27d28caddc5dc5ad07d1d0e..f93081cea94cbe544617596797ccf0d6918d3aed 100644 |
| --- a/runtime/vm/benchmark_test.cc |
| +++ b/runtime/vm/benchmark_test.cc |
| @@ -96,7 +96,7 @@ void Benchmark::RunAll(const char* executable) { |
| Dart_Isolate Benchmark::CreateIsolate(const uint8_t* buffer) { |
| - bin::IsolateData* isolate_data = new bin::IsolateData(NULL, NULL, NULL); |
| + bin::IsolateData* isolate_data = NULL; |
| char* err = NULL; |
| isolate_ = Dart_CreateIsolate(NULL, NULL, buffer, NULL, isolate_data, &err); |
|
zra
2017/01/11 19:05:21
Any reason not to drop the variable and just pass
rmacnak
2017/01/11 19:11:08
Good point, done.
|
| EXPECT(isolate_ != NULL); |
| @@ -520,6 +520,9 @@ BENCHMARK_SIZE(CoreSnapshotSize) { |
| const Snapshot* snapshot = Snapshot::SetupFromBuffer(isolate_snapshot_buffer); |
| ASSERT(snapshot->kind() == Snapshot::kCore); |
| benchmark->set_score(snapshot->length()); |
| + |
| + free(vm_isolate_snapshot_buffer); |
| + free(isolate_snapshot_buffer); |
| } |
| @@ -554,6 +557,9 @@ BENCHMARK_SIZE(StandaloneSnapshotSize) { |
| const Snapshot* snapshot = Snapshot::SetupFromBuffer(isolate_snapshot_buffer); |
| ASSERT(snapshot->kind() == Snapshot::kCore); |
| benchmark->set_score(snapshot->length()); |
| + |
| + free(vm_isolate_snapshot_buffer); |
| + free(isolate_snapshot_buffer); |
| } |