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 @@ -1154,13 +1154,14 @@ int LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr,
1154
1154
return exit_code;
1155
1155
}
1156
1156
std::unique_ptr<SnapshotData> read_data = std::make_unique<SnapshotData>();
1157
- if (!SnapshotData::FromBlob (read_data.get (), fp)) {
1157
+ bool ok = SnapshotData::FromBlob (read_data.get (), fp);
1158
+ fclose (fp);
1159
+ if (!ok) {
1158
1160
// If we fail to read the customized snapshot, simply exit with 1.
1159
1161
exit_code = 1 ;
1160
1162
return exit_code;
1161
1163
}
1162
1164
*snapshot_data_ptr = read_data.release ();
1163
- fclose (fp);
1164
1165
} else if (per_process::cli_options->node_snapshot ) {
1165
1166
// If --snapshot-blob is not specified, we are reading the embedded
1166
1167
// snapshot, but we will skip it if --no-node-snapshot is specified.
You can’t perform that action at this time.
0 commit comments