Index: snapshot/mac/process_snapshot_mac.cc |
diff --git a/snapshot/mac/process_snapshot_mac.cc b/snapshot/mac/process_snapshot_mac.cc |
index 767c75a049fac3a7bd91bb9d0c1e2ff571fe88b6..158e85ce0fa19ad2907b6866ca7ff8768d92d69b 100644 |
--- a/snapshot/mac/process_snapshot_mac.cc |
+++ b/snapshot/mac/process_snapshot_mac.cc |
@@ -147,6 +147,7 @@ void ProcessSnapshotMac::InitializeThreads() { |
internal::ThreadSnapshotMac* thread = new internal::ThreadSnapshotMac(); |
threads_.push_back(thread); |
if (!thread->Initialize(&process_reader_, process_reader_thread)) { |
Robert Sesek
2015/03/04 01:52:25
Could you restructure this as:
auto thread = make
|
+ delete thread; |
threads_.pop_back(); |
} |
} |
@@ -160,6 +161,7 @@ void ProcessSnapshotMac::InitializeModules() { |
internal::ModuleSnapshotMac* module = new internal::ModuleSnapshotMac(); |
modules_.push_back(module); |
if (!module->Initialize(&process_reader_, process_reader_module)) { |
+ delete module; |
modules_.pop_back(); |
} |
} |