| 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));
|
| }
|
|
|