]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshecc.c
Missing initialisation in winsecur.c.
[PuTTY.git] / sshecc.c
index 3bb2082b6e4423bc2342429e8e0912912f35b5d0..3ce6c7fe6ae07e19e3b0b35dfdba92398e1cf999 100644 (file)
--- a/sshecc.c
+++ b/sshecc.c
@@ -2029,10 +2029,10 @@ static void *ed25519_openssh_createkey(const struct ssh_signkey *self,
     }
 
     getstring((const char**)blob, len, &q, &qlen);
-    if (!q)
-        return NULL;
-    if (qlen != 64)
+    if (!q || qlen != 64) {
+        ecdsa_freekey(ec);
         return NULL;
+    }
 
     ec->privateKey = bignum_from_bytes_le((const unsigned char *)q, 32);