Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
| } | ||
| finally | ||
| { | ||
| Marshal.FreeHGlobal((IntPtr)pBuffer); |
There was a problem hiding this comment.
This is fixing the double-free.
| } | ||
| finally | ||
| { | ||
| NativeMemory.Free(processInfo); |
There was a problem hiding this comment.
This is fixing a related memory leak.
| finally | ||
| { | ||
| Marshal.FreeHGlobal((IntPtr)entries); | ||
| NativeMemory.Free(entries); |
There was a problem hiding this comment.
Took this as an opportunity to switch to NativeMemory API and avoid the casts in these files.
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process Issue DetailsFixes #14537 (comment)
|
|
ooooh! So, this fixes the segfault that started to crop up after some SDK changes around preview 3? Also, will this get back ported to 6.0? |
Probably. That something you can verify. I have not verified it.
@danmoseley Are you willing to take this for 6.0? This is a fix for double-free bug in FreeBSD specific code, not touching officially supported configs. |
Fixes #14537 (comment)