Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tracer/src/Datadog.Trace/AppSec/Security.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ private string GetHtmlResponse()
public void Dispose()
{
_waf?.Dispose();
Encoder.Pool.Dispose();
Encoder.Dispose();
_activeAddressesLocker.Dispose();
}

Expand Down
16 changes: 16 additions & 0 deletions tracer/src/Datadog.Trace/AppSec/WafEncoding/Encoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ internal static UnmanagedMemoryPool Pool
}
}

internal static void Dispose()
{
try
{
if (_pool is { IsDisposed: false })
{
_pool.Dispose();
_pool = null;
}
}
catch (Exception ex)
{
Log.Debug(ex, "WafEncoder Crashed on shutdown.");
}
}

/// <summary>
/// For testing purposes
/// </summary>
Expand Down
Loading