View | Details | Raw Unified | Return to bug 2734
Collapse All | Expand All

(-)a/ssh-keyscan.c (-2 / +2 lines)
Lines 390-396 confree(int s) Link Here
390
{
390
{
391
	if (s >= maxfd || fdcon[s].c_status == CS_UNUSED)
391
	if (s >= maxfd || fdcon[s].c_status == CS_UNUSED)
392
		fatal("confree: attempt to free bad fdno %d", s);
392
		fatal("confree: attempt to free bad fdno %d", s);
393
	close(s);
394
	free(fdcon[s].c_namebase);
393
	free(fdcon[s].c_namebase);
395
	free(fdcon[s].c_output_name);
394
	free(fdcon[s].c_output_name);
396
	if (fdcon[s].c_status == CS_KEYS)
395
	if (fdcon[s].c_status == CS_KEYS)
Lines 401-407 confree(int s) Link Here
401
		ssh_packet_close(fdcon[s].c_ssh);
400
		ssh_packet_close(fdcon[s].c_ssh);
402
		free(fdcon[s].c_ssh);
401
		free(fdcon[s].c_ssh);
403
		fdcon[s].c_ssh = NULL;
402
		fdcon[s].c_ssh = NULL;
404
	}
403
	} else
404
		close(s);
405
	TAILQ_REMOVE(&tq, &fdcon[s], c_link);
405
	TAILQ_REMOVE(&tq, &fdcon[s], c_link);
406
	FD_CLR(s, read_wait);
406
	FD_CLR(s, read_wait);
407
	ncon--;
407
	ncon--;

Return to bug 2734