Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Unified Diff: runtime/bin/platform.h

Issue 1813943004: Fix dangling pointer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/platform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform.h
diff --git a/runtime/bin/platform.h b/runtime/bin/platform.h
index 35ac3b0c4200d06c0bb17aa8f765be8c8ad31bd5..79cb7bec61264e839ff3f58ca82f0d6c5d00500b 100644
--- a/runtime/bin/platform.h
+++ b/runtime/bin/platform.h
@@ -48,7 +48,7 @@ class Platform {
static const char* GetResolvedExecutableName() {
if (resolved_executable_name_ == NULL) {
// Try to resolve the executable path using platform specific APIs.
- resolved_executable_name_ = Platform::ResolveExecutablePath();
+ resolved_executable_name_ = strdup(Platform::ResolveExecutablePath());
}
return resolved_executable_name_;
}
@@ -71,7 +71,7 @@ class Platform {
// The path to the executable.
static const char* executable_name_;
// The path to the resolved executable.
- static const char* resolved_executable_name_;
+ static char* resolved_executable_name_;
static int script_index_;
static char** argv_; // VM flags are argv_[1 ... script_index_ - 1]
« no previous file with comments | « no previous file | runtime/bin/platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698