diff --git a/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoHelper.java b/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoHelper.java index 8b503770d..6d579f525 100644 --- a/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoHelper.java +++ b/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageCryptoHelper.java @@ -194,6 +194,12 @@ public class MessageCryptoHelper { signatureBodyPart.writeTo(out); } catch (Exception e) { Log.e(K9.LOG_TAG, "Exception while writing message to crypto provider", e); + } finally { + try { + out.close(); + } catch (IOException e) { + // don't care + } } } }).start(); @@ -215,6 +221,12 @@ public class MessageCryptoHelper { encryptionPayloadBody.writeTo(out); } catch (Exception e) { Log.e(K9.LOG_TAG, "Exception while writing message to crypto provider", e); + } finally { + try { + out.close(); + } catch (IOException e) { + // don't care + } } } }).start();