| Summary: | potential fd leak | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Loganaden Velvindron <loganaden> | ||||
| Component: | sftp | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | enhancement | CC: | djm | ||||
| Priority: | P5 | ||||||
| Version: | -current | ||||||
| Hardware: | Other | ||||||
| OS: | Linux | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 2130 | ||||||
| Attachments: |
|
||||||
Created attachment 2374 [details]
potential_fd_leak_fix
applied - thanks. Close all resolved bugs after 7.3p1 release |
in sftp-client.c: if (resume_flag) { if (fstat(local_fd, &st) == -1) { error("Unable to stat local file \"%s\": %s", local_path, strerror(errno)); goto fail; } if ((size_t)st.st_size > size) { error("Unable to resume download of \"%s\": " "local file is larger than remote", local_path); fail: do_close(conn, handle, handle_len); buffer_free(&msg); free(handle); return -1; in the fail label, local_fd is not closed in case open() call was successful.