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

Unified Diff: runtime/bin/platform.cc

Issue 1781883002: Fixes some memory leaks in //runtime/bin (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix tests on Windows 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 | « runtime/bin/platform.h ('k') | runtime/bin/platform_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform.cc
diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc
index f2f16befee58e56ea0bb3cd8ad3397c553958efb..75324f1077792a113b2d16226d7725df4db4b6a7 100644
--- a/runtime/bin/platform.cc
+++ b/runtime/bin/platform.cc
@@ -102,22 +102,18 @@ void FUNCTION_NAME(Platform_Environment)(Dart_NativeArguments args) {
} else {
Dart_Handle result = Dart_NewList(count);
if (Dart_IsError(result)) {
- Platform::FreeEnvironment(env, count);
Dart_PropagateError(result);
}
for (intptr_t i = 0; i < count; i++) {
Dart_Handle str = DartUtils::NewString(env[i]);
if (Dart_IsError(str)) {
- Platform::FreeEnvironment(env, count);
Dart_PropagateError(str);
}
Dart_Handle error = Dart_ListSetAt(result, i, str);
if (Dart_IsError(error)) {
- Platform::FreeEnvironment(env, count);
Dart_PropagateError(error);
}
}
- Platform::FreeEnvironment(env, count);
Dart_SetReturnValue(args, result);
}
}
« no previous file with comments | « runtime/bin/platform.h ('k') | runtime/bin/platform_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698