Skip to content

Interop.Process.GetProcPath on FreeBSD leaks #43418

@stephentoub

Description

@stephentoub

int ret = Interop.Sys.Sysctl(sysctlName, ref pBuffer, ref bytesLength);
if (ret != 0 ) {
return null;
}
return System.Text.Encoding.UTF8.GetString(pBuffer, (int)bytesLength-1);

Sysctl may allocate a buffer that the caller needs to free.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions