1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-12 21:19:25 +01:00

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:
cpfeiffer 2015-08-06 00:40:49 +02:00
parent b7223c7e86
commit 8dee55198e

View File

@ -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;