Index: runtime/bin/gen_snapshot.cc |
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc |
index ea9f3d7bf0a1b4e4fe823668825ca9a898367c6b..45087b4c502233d3ccac6f0c491e74078ce5a663 100644 |
--- a/runtime/bin/gen_snapshot.cc |
+++ b/runtime/bin/gen_snapshot.cc |
@@ -1142,6 +1142,11 @@ int main(int argc, char** argv) { |
SetupForGenericSnapshotCreation(); |
CreateAndWriteSnapshot(); |
} |
+ error = Dart_Cleanup(); |
+ if (error != NULL) { |
+ Log::PrintErr("VM cleanup failed: %s\n", error); |
+ free(error); |
+ } |
EventHandler::Stop(); |
return 0; |
} |