From a503e05db9d2f382b4218ac90a75232655395bc1 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Tue, 10 Dec 2024 07:02:01 +1100 Subject: [PATCH] missing dispose for GetCurrentProcess --- src/IdentityServer/Services/Default/DefaultEventService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IdentityServer/Services/Default/DefaultEventService.cs b/src/IdentityServer/Services/Default/DefaultEventService.cs index 939240965..cc4ac23cb 100644 --- a/src/IdentityServer/Services/Default/DefaultEventService.cs +++ b/src/IdentityServer/Services/Default/DefaultEventService.cs @@ -112,7 +112,8 @@ protected virtual bool CanRaiseEvent(Event evt) protected virtual async Task PrepareEventAsync(Event evt) { evt.TimeStamp = Clock.UtcNow.DateTime; - evt.ProcessId = Process.GetCurrentProcess().Id; + using var process = Process.GetCurrentProcess(); + evt.ProcessId = process.Id; if (Context.HttpContext?.TraceIdentifier != null) {