1 files changed, 11 insertions, 10 deletions
diff --git a/crypto/src/util/zlib/ZInputStream.cs b/crypto/src/util/zlib/ZInputStream.cs
index ee19af587..4b7351555 100644
--- a/crypto/src/util/zlib/ZInputStream.cs
+++ b/crypto/src/util/zlib/ZInputStream.cs
@@ -98,22 +98,23 @@ namespace Org.BouncyCastle.Utilities.Zlib
{
if (disposing)
{
- if (!closed)
- {
- closed = true;
- Platform.Dispose(input);
- }
+ if (closed)
+ return;
+
+ closed = true;
+ Platform.Dispose(input);
}
base.Dispose(disposing);
}
#else
public override void Close()
{
- if (!closed)
- {
- closed = true;
- Platform.Dispose(input);
- }
+ if (closed)
+ return;
+
+ closed = true;
+ Platform.Dispose(input);
+ base.Close();
}
#endif
|