pki: Fix allocation of ed25519 public keys

Signed-off-by: Tiamo Laitakari <tiamo.laitakari@cs.helsinki.fi>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 5478de1a64)
This commit is contained in:
Tiamo Laitakari
2015-06-15 14:32:40 +03:00
committed by Andreas Schneider
parent eb98a780ed
commit 342ae10f08

View File

@@ -35,8 +35,8 @@ int pki_key_generate_ed25519(ssh_key key)
goto error;
}
key->ed25519_pubkey = malloc(sizeof (ed25519_privkey));
if (key->ed25519_privkey == NULL) {
key->ed25519_pubkey = malloc(sizeof (ed25519_pubkey));
if (key->ed25519_pubkey == NULL) {
goto error;
}