Index: runtime/vm/service_isolate.cc |
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc |
index a316c6ccc6c596db9fb503ada73f564447037ead..dcfc541befcbf68dad0ed0eb4349ee296faec1c1 100644 |
--- a/runtime/vm/service_isolate.cc |
+++ b/runtime/vm/service_isolate.cc |
@@ -78,6 +78,18 @@ intptr_t ServiceIsolate::exit_message_length_ = 0; |
Monitor* ServiceIsolate::monitor_ = NULL; |
bool ServiceIsolate::initializing_ = true; |
bool ServiceIsolate::shutting_down_ = false; |
+char* ServiceIsolate::server_address_ = NULL; |
+ |
+void ServiceIsolate::SetServerAddress(const char* address) { |
+ if (server_address_ != NULL) { |
+ free(server_address_); |
+ server_address_ = NULL; |
+ } |
+ if (address == NULL) { |
+ return; |
+ } |
+ server_address_ = strdup(address); |
+} |
bool ServiceIsolate::NameEquals(const char* name) { |
@@ -467,6 +479,10 @@ void ServiceIsolate::Shutdown() { |
ml.Wait(); |
} |
} |
+ if (server_address_ != NULL) { |
+ free(server_address_); |
+ server_address_ = NULL; |
+ } |
} |