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

Unified Diff: runtime/bin/builtin.cc

Issue 1800863002: Cleanup in //runtime/bin (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/builtin_gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.cc
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc
index 021140bea78dc4540595dc91d6d222f04eeeada8..272976fed9b2d105baa7e24e4c6f28819c6b7e10 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -38,10 +38,9 @@ static void LoadPatchFiles(Dart_Handle library,
// Prepend the patch library URI to form a unique script URI for the patch.
intptr_t len = snprintf(NULL, 0, "%s/%s", patch_uri, patch_files[j]);
- char* patch_filename = reinterpret_cast<char*>(malloc(len + 1));
+ char* patch_filename = DartUtils::ScopedCString(len + 1);
snprintf(patch_filename, len + 1, "%s/%s", patch_uri, patch_files[j]);
Dart_Handle patch_file_uri = DartUtils::NewString(patch_filename);
- free(patch_filename);
DART_CHECK_VALID(Dart_LibraryLoadPatch(library, patch_file_uri, patch_src));
}
« no previous file with comments | « no previous file | runtime/bin/builtin_gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698