Skip to content

Commit

Permalink
SafeProcessHandle.Unix: fix missing DangerousRelease (#37412)
Browse files Browse the repository at this point in the history
Because the SafeProcessHandle was not owned, ReleaseHandle was
not called, causing the wrapped SafeWaitHandle to never release
its resources.
  • Loading branch information
tmds committed Jun 4, 2020
1 parent 13beb4d commit 13fbbee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public sealed partial class SafeProcessHandle : SafeHandleZeroOrMinusOneIsInvali
private readonly bool _releaseRef;

internal SafeProcessHandle(int processId, SafeWaitHandle handle) :
this(handle.DangerousGetHandle(), ownsHandle: false)
this(handle.DangerousGetHandle(), ownsHandle: true)
{
ProcessId = processId;
_handle = handle;
Expand Down

0 comments on commit 13fbbee

Please sign in to comment.