Index: runtime/bin/process_win.cc |
diff --git a/runtime/bin/process_win.cc b/runtime/bin/process_win.cc |
index ebf4ce3982c118d5403ffa8598c7fe2a4afcd7c8..0496065ea5271f3f85fbc39ecad765bfd07302cb 100644 |
--- a/runtime/bin/process_win.cc |
+++ b/runtime/bin/process_win.cc |
@@ -8,6 +8,7 @@ |
#include <process.h> // NOLINT |
#include "bin/builtin.h" |
+#include "bin/dartutils.h" |
#include "bin/process.h" |
#include "bin/eventhandler.h" |
#include "bin/lockers.h" |
@@ -464,8 +465,6 @@ class ProcessStarter { |
remaining -= written; |
ASSERT(remaining >= 0); |
} |
- free(const_cast<wchar_t*>(system_path)); |
- for (int i = 0; i < arguments_length; i++) free(system_arguments[i]); |
delete[] system_arguments; |
// Create environment block if an environment is supplied. |
@@ -498,9 +497,6 @@ class ProcessStarter { |
// Block-terminating zero char. |
environment_block_[block_index++] = '\0'; |
ASSERT(block_index == block_size); |
- for (intptr_t i = 0; i < environment_length; i++) { |
- free(system_environment[i]); |
- } |
delete[] system_environment; |
} |
@@ -518,9 +514,6 @@ class ProcessStarter { |
// Deallocate command-line and environment block strings. |
delete[] command_line_; |
delete[] environment_block_; |
- if (system_working_directory_ != NULL) { |
- free(const_cast<wchar_t*>(system_working_directory_)); |
- } |
if (attribute_list_ != NULL) { |
delete_proc_thread_attr_list(attribute_list_); |
free(attribute_list_); |