mirror of https://github.com/golang/go.git
internal/poll: avoid memory leak in Writev
This commit is contained in:
parent
1ab063ce53
commit
e0b7f68447
|
|
@ -64,6 +64,9 @@ func (fd *FD) Writev(v *[][]byte) (int64, error) {
|
|||
TestHookDidWritev(int(wrote))
|
||||
n += int64(wrote)
|
||||
consume(v, int64(wrote))
|
||||
for i := range iovecs {
|
||||
iovecs[i] = syscall.Iovec{}
|
||||
}
|
||||
if err != nil {
|
||||
if err.(syscall.Errno) == syscall.EAGAIN {
|
||||
if err = fd.pd.waitWrite(fd.isFile); err == nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue