mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-01 11:27:48 +02:00
NBTConnectionReceiveBuffer: Avoid exception when calling Dispose twice
This commit is contained in:
parent
d34f014eab
commit
dad516b223
1 changed files with 5 additions and 2 deletions
|
@ -127,11 +127,14 @@ namespace SMBLibrary.NetBios
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
if (m_buffer != null)
|
||||||
|
{
|
||||||
#if NETSTANDARD2_0
|
#if NETSTANDARD2_0
|
||||||
ArrayPool<byte>.Shared.Return(m_buffer);
|
ArrayPool<byte>.Shared.Return(m_buffer);
|
||||||
#endif
|
#endif
|
||||||
m_buffer = null;
|
m_buffer = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public byte[] Buffer
|
public byte[] Buffer
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue