| Summary: | close() is called twice in confree() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | balu <bagajjal> | ||||
| Component: | ssh-keyscan | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | minor | CC: | djm, dtucker | ||||
| Priority: | P5 | ||||||
| Version: | 7.5p1 | ||||||
| Hardware: | Other | ||||||
| OS: | Other | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 2698 | ||||||
| Attachments: |
|
||||||
Created attachment 3001 [details]
ssh-keyscan: Close ssh channel FDs only once
Patch applied and will be in 7.6. Thanks. closing resolved bugs as of 8.6p1 release |
close() is called twice in confree() Current code - ssh_packet_close() internally calls the close() again. confree(int s) { ...... ...... close(s); ...... ...... if (fdcon[s].c_ssh) { ssh_packet_close(fdcon[s].c_ssh); ...... ...... } Fix - confree(int s) { ...... ...... if (fdcon[s].c_ssh) { ssh_packet_close(fdcon[s].c_ssh); free(fdcon[s].c_ssh); fdcon[s].c_ssh = NULL; } else close(s); ...... ...... }