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

Unified Diff: runtime/vm/parser.cc

Issue 2629533002: Fix leak of message snapshot buffer when attempting to send an illegal object. (Closed)
Patch Set: Created 3 years, 11 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 | « runtime/vm/isolate.cc ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 7c250ae19bfe476a5993b800a04577af032aa4cd..62dc8e3800dacf0a0ac7bc9c223676c88fe3953a 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -9918,7 +9918,7 @@ AstNode* Parser::ParseJump(String* label_name) {
ReportError(jump_pos, "label '%s' not found", target_name.ToCString());
}
} else if (FLAG_enable_debug_break && (CurrentToken() == Token::kSTRING)) {
- const char* message = strdup(CurrentLiteral()->ToCString());
+ const char* message = Z->MakeCopyOfString(CurrentLiteral()->ToCString());
ConsumeToken();
return new (Z) StopNode(jump_pos, message);
} else {
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698