diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-08-12 23:46:45 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-08-13 00:22:10 +0900 |
commit | f615fa49a768bb358e6318e64dc42e9a6af10681 (patch) | |
tree | e196b3c3c2a88ef4bbf6e7c5c0dda176792e5482 /server/mrt.go | |
parent | 534531b1b1887ac7146adcbbbef906f440abec37 (diff) |
server: fix fd leak in DialTCP() on Linux
A new socket was created so we must close it before this function
returns _either_ on failure or success. On success, net.FileConn() in
newTCPConn() increases the refcount of the socket so this fi.Close()
doesn't destroy the socket; the caller can use it (and needs to close
it later).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/mrt.go')
0 files changed, 0 insertions, 0 deletions