Patchset ps-171
fix(send): sftp memory leak
Eric Bower
The SFTP Fileread method returned a ReadAndReaderAtCloser (backed by storage objects) without ever closing it, leaking connections/file descriptors on every SFTP download. The fix reads the content into memory and immediately closes the underlying reader via defer.
+15
-1
pkg/send/protocols/sftp/handler.go
link
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|