File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1168,14 +1168,15 @@ ExitCode LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr,
1168
1168
return exit_code;
1169
1169
}
1170
1170
std::unique_ptr<SnapshotData> read_data = std::make_unique<SnapshotData>();
1171
- if (!SnapshotData::FromBlob (read_data.get (), fp)) {
1171
+ bool ok = SnapshotData::FromBlob (read_data.get (), fp);
1172
+ fclose (fp);
1173
+ if (!ok) {
1172
1174
// If we fail to read the customized snapshot, simply exit with 1.
1173
1175
// TODO(joyeecheung): should be kStartupSnapshotFailure.
1174
1176
exit_code = ExitCode::kGenericUserError ;
1175
1177
return exit_code;
1176
1178
}
1177
1179
*snapshot_data_ptr = read_data.release ();
1178
- fclose (fp);
1179
1180
} else if (per_process::cli_options->node_snapshot ) {
1180
1181
// If --snapshot-blob is not specified, we are reading the embedded
1181
1182
// snapshot, but we will skip it if --no-node-snapshot is specified.
You can’t perform that action at this time.
0 commit comments