File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 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,
11541154 return exit_code;
11551155 }
11561156 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) {
11581160 // If we fail to read the customized snapshot, simply exit with 1.
11591161 exit_code = 1 ;
11601162 return exit_code;
11611163 }
11621164 *snapshot_data_ptr = read_data.release ();
1163- fclose (fp);
11641165 } else if (per_process::cli_options->node_snapshot ) {
11651166 // If --snapshot-blob is not specified, we are reading the embedded
11661167 // snapshot, but we will skip it if --no-node-snapshot is specified.
You can’t perform that action at this time.
0 commit comments