Commit 6e63f12
authored
fix(provisioner): close SSH client before reassign, close pipe reader (#659)
provision() overwrote p.Client with a new SSH connection without
closing the old one, leaking TCP sockets and goroutines. Also close
the io.Pipe reader after wg.Wait() for completeness.
Audit findings #14 (MEDIUM), #29 (LOW).
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>1 parent 6ed4d7b commit 6e63f12
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
| |||
263 | 269 | | |
264 | 270 | | |
265 | 271 | | |
| 272 | + | |
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
| |||
0 commit comments