diff options
Diffstat (limited to 'crypto/src/asn1/LazyDLSet.cs')
-rw-r--r-- | crypto/src/asn1/LazyDLSet.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/src/asn1/LazyDLSet.cs b/crypto/src/asn1/LazyDLSet.cs index 7386e72ba..87354d394 100644 --- a/crypto/src/asn1/LazyDLSet.cs +++ b/crypto/src/asn1/LazyDLSet.cs @@ -99,10 +99,13 @@ namespace Org.BouncyCastle.Asn1 { if (null != m_encoded) { - Asn1InputStream input = new LazyAsn1InputStream(m_encoded); try { - Asn1EncodableVector v = input.ReadVector(); + Asn1EncodableVector v; + using (var input = new LazyAsn1InputStream(m_encoded)) + { + v = input.ReadVector(); + } m_elements = v.TakeElements(); m_sortedElements = m_elements.Length <= 1 ? m_elements : null; |