GUACAMOLE-362: Fix resource leak in FileInputStream when reading private key.

This commit is contained in:
Nick Couchman
2017-10-28 09:15:58 -04:00
parent 1a7f85ae51
commit 5c0c823913

View File

@@ -60,6 +60,7 @@ public abstract class PrivateKeyGuacamoleProperty implements GuacamoleProperty<P
for (int readBytes; (readBytes = keyStreamIn.read(keyBuffer)) != -1;)
keyStreamOut.write(keyBuffer, 0, readBytes);
keyStreamIn.close();
final byte[] keyBytes = keyStreamOut.toByteArray();
// Set up decryption infrastructure