ed25519: fix leak in pki_ed25519_sign

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jon Simons
2014-09-27 02:31:10 -07:00
committed by Andreas Schneider
parent 59da8dab50
commit a6d412f0d7

View File

@@ -59,9 +59,9 @@ int pki_ed25519_sign(const ssh_key privkey,
const unsigned char *hash,
size_t hlen)
{
uint8_t *buffer = malloc(hlen + ED25519_SIG_LEN);
unsigned long long dlen = 0;
int rc;
uint8_t *buffer;
unsigned long long dlen = 0;
buffer = malloc(hlen + ED25519_SIG_LEN);
if (buffer == NULL) {