-/* $OpenBSD: auth2-pubkey.c,v 1.75 2018/01/23 05:27:21 djm Exp $ */
+/* $OpenBSD: auth2-pubkey.c,v 1.76 2018/02/07 22:52:45 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
/* Always consume entire file */
if (found_key)
continue;
- if (found != NULL)
- sshkey_free(found);
+ sshkey_free(found);
found = sshkey_new(sshkey_is_cert(key) ? KEY_UNSPEC : key->type);
if (found == NULL)
goto done;
}
}
done:
- if (found != NULL)
- sshkey_free(found);
+ sshkey_free(found);
if (!found_key)
debug2("key not found");
return found_key;
-/* $OpenBSD: ssh-keysign.c,v 1.52 2016/02/15 09:47:49 dtucker Exp $ */
+/* $OpenBSD: ssh-keysign.c,v 1.53 2018/02/07 22:52:45 dtucker Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
*
debug3("%s: fail %d", __func__, fail);
- if (fail && key != NULL)
+ if (fail)
sshkey_free(key);
else if (ret != NULL)
*ret = key;
-/* $OpenBSD: sshconnect.c,v 1.292 2018/01/23 18:33:49 stsp Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.293 2018/02/07 22:52:45 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
host_key = raw_key;
goto retry;
}
- if (raw_key != NULL)
- sshkey_free(raw_key);
+ sshkey_free(raw_key);
free(ip);
free(host);
if (host_hostkeys != NULL)
-/* $OpenBSD: sshconnect2.c,v 1.267 2018/01/23 05:27:21 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.268 2018/02/07 22:52:45 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
}
}
done:
- if (key != NULL)
- key_free(key);
+ key_free(key);
free(pkalg);
free(pkblob);