=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.271 retrieving revision 1.272 diff -u -r1.271 -r1.272 --- src/usr.bin/ssh/clientloop.c 2015/02/23 16:33:25 1.271 +++ src/usr.bin/ssh/clientloop.c 2015/02/25 19:54:02 1.272 @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.271 2015/02/23 16:33:25 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.272 2015/02/25 19:54:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -2303,10 +2303,8 @@ char *fp; static int hostkeys_seen = 0; /* XXX use struct ssh */ extern struct sockaddr_storage hostaddr; /* XXX from ssh.c */ - struct hostkeys_update_ctx *ctx; + struct hostkeys_update_ctx *ctx = NULL; - ctx = xcalloc(1, sizeof(*ctx)); - if (hostkeys_seen) fatal("%s: server already sent hostkeys", __func__); if (options.update_hostkeys == SSH_UPDATE_HOSTKEYS_ASK && @@ -2314,6 +2312,8 @@ return 1; /* won't ask in batchmode, so don't even try */ if (!options.update_hostkeys || options.num_user_hostfiles <= 0) return 1; + + ctx = xcalloc(1, sizeof(*ctx)); while (ssh_packet_remaining(ssh) > 0) { sshkey_free(key); key = NULL;