summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/Asn1InputStream.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/src/asn1/Asn1InputStream.cs b/crypto/src/asn1/Asn1InputStream.cs
index 1df6a0206..da6175fcc 100644
--- a/crypto/src/asn1/Asn1InputStream.cs
+++ b/crypto/src/asn1/Asn1InputStream.cs
@@ -17,7 +17,7 @@ namespace Org.BouncyCastle.Asn1
     {
         private readonly int limit;
 
-        internal readonly byte[][] tmpBuffers;
+        internal byte[][] tmpBuffers;
 
         internal static int FindLimit(Stream input)
         {
@@ -67,6 +67,13 @@ namespace Org.BouncyCastle.Asn1
             this.tmpBuffers = tmpBuffers;
         }
 
+        protected override void Dispose(bool disposing)
+        {
+            tmpBuffers = null;
+
+            base.Dispose(disposing);
+        }
+
         /**
         * build an object given its tag and the number of bytes to construct it from.
         */