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); ...... ...... }
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