summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiamo Laitakari <tiamo.laitakari@cs.helsinki.fi>2015-06-15 14:32:40 +0300
committerAndreas Schneider <asn@cryptomilk.org>2015-06-24 18:36:08 +0200
commit342ae10f08adb4804806542d3b81a81a25d4a687 (patch)
tree37c8fbf2e05aa7a02cc4662519d5d4b4aa7f5ba4
parenteb98a780ed11cf83d2265a8a57c07419516c54de (diff)
downloadlibssh-342ae10f08adb4804806542d3b81a81a25d4a687.tar.gz
libssh-342ae10f08adb4804806542d3b81a81a25d4a687.tar.xz
libssh-342ae10f08adb4804806542d3b81a81a25d4a687.zip
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 5478de1a64251c3f7e19260e599045061136f2e9)
-rw-r--r--src/pki_ed25519.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pki_ed25519.c b/src/pki_ed25519.c
index 7fb9827c..37d3c878 100644
--- a/src/pki_ed25519.c
+++ b/src/pki_ed25519.c
@@ -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;
}