4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
6
6
* You may obtain a copy of the License at
7
- *
7
+ *
8
8
* http://www.apache.org/licenses/LICENSE-2.0
9
- *
9
+ *
10
10
* Unless required by applicable law or agreed to in writing, software
11
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,8 +32,8 @@ public class ZipFileSystemFactory
32
32
* Use "-Dghidra.file.formats.zip.ZipFileSystemFactory.USE_BUILTIN_ZIP_SUPPORT=true" jvm
33
33
* startup option to disable use of 7zip libraries when opening zip filesystems.
34
34
*/
35
- private static boolean USE_BUILTIN_ZIP_SUPPORT = Boolean
36
- .getBoolean ("ghidra.file.formats.zip.ZipFileSystemFactory.USE_BUILTIN_ZIP_SUPPORT" );
35
+ private static boolean USE_BUILTIN_ZIP_SUPPORT =
36
+ Boolean .getBoolean ("ghidra.file.formats.zip.ZipFileSystemFactory.USE_BUILTIN_ZIP_SUPPORT" );
37
37
38
38
private static final int START_BYTES_REQUIRED = 2 ;
39
39
@@ -84,6 +84,7 @@ public GFileSystem create(FSRLRoot targetFSRL, ByteProvider byteProvider,
84
84
ZipFileSystemBuiltin .TEMPFILE_PREFIX , monitor );
85
85
deleteZipFileWhenDone = true ;
86
86
}
87
+ FSUtilities .uncheckedClose (byteProvider , null );
87
88
ZipFileSystemBuiltin fs = new ZipFileSystemBuiltin (targetFSRL , fsService );
88
89
try {
89
90
fs .mount (zipFile , deleteZipFileWhenDone , monitor );
0 commit comments