summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-30 10:35:12 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-30 10:35:12 +0700
commit659eafd2dffa3c1ab2a15b60bac583635b3769cc (patch)
tree19d292864ae4697e1e23fd58897af3a0252b861d /crypto/src/asn1
parentSome PORTABLE cleanup (diff)
downloadBouncyCastle.NET-ed25519-659eafd2dffa3c1ab2a15b60bac583635b3769cc.tar.xz
Null tmpBuffers when disposing
Diffstat (limited to '')
-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.
         */