Don't (always) leak the file descriptor.
It's still very much possible to leak the descriptor (when an exception occurs somewhere in between or anything else goes wrong). So maybe the whole thing should be redesigned to be independent of files.
This commit is contained in:
parent
b7223c7e86
commit
8dee55198e
|
@ -419,6 +419,11 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
|||
|
||||
mPBWReader = null;
|
||||
mIsInstalling = false;
|
||||
try {
|
||||
mZis.close();
|
||||
} catch (IOException e) {
|
||||
// ignore
|
||||
}
|
||||
mZis = null;
|
||||
mAppInstallToken = -1;
|
||||
mInstallSlot = -2;
|
||||
|
|
Loading…
Reference in New Issue