mirror of https://github.com/shirou/gopsutil
Provide correct length for slice creation.
- Creating a slice of length numFDs and later appending elements to it results in a slice whose first numFDs elements are all nil. It is sufficient to create a slice of zero length since we are appending elements to it. - The current allocation will make ret a slice of length 0. What's needed is a slice of length len(ofs).pull/171/head
parent
a0cf924cac
commit
be2dab5a40
Loading…
Reference in New Issue