Index: runtime/bin/gen_snapshot.cc |
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc |
index 3ebc8fb986e70c8367b667b34bb975285007db68..d97f29ea59d2f9e265caa4ce108d077c0d9b84de 100644 |
--- a/runtime/bin/gen_snapshot.cc |
+++ b/runtime/bin/gen_snapshot.cc |
@@ -383,6 +383,7 @@ static void WriteSnapshotFile(const char* filename, |
Log::PrintErr("Error: Unable to write snapshot file: %s\n\n", filename); |
Dart_ExitScope(); |
Dart_ShutdownIsolate(); |
+ Dart_Cleanup(); |
exit(kErrorExitCode); |
} |
if (!file->WriteFully(buffer, size)) { |