1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

fix malloc/free mismatches #296 (#297)

This commit is contained in:
Will Cosgrove
2019-02-21 12:00:44 -08:00
committed by GitHub
parent 097448107a
commit f7dd7d1d43
3 changed files with 13 additions and 13 deletions

View File

@@ -2421,8 +2421,8 @@ kex_method_ecdh_key_exchange
goto ecdh_clean_exit;
}
rc = _libssh2_ecdsa_create_key(&key_state->private_key, &key_state->public_key_oct,
&key_state->public_key_oct_len, type);
rc = _libssh2_ecdsa_create_key(session, &key_state->private_key,
&key_state->public_key_oct, &key_state->public_key_oct_len, type);
if(rc != 0) {
ret = _libssh2_error(session, rc,
@@ -2489,7 +2489,7 @@ kex_method_ecdh_key_exchange
ecdh_clean_exit:
if(key_state->public_key_oct) {
free(key_state->public_key_oct);
LIBSSH2_FREE(session, key_state->public_key_oct);
key_state->public_key_oct = NULL;
}
@@ -2988,7 +2988,7 @@ kex_method_curve25519_key_exchange
goto clean_exit;
}
rc = _libssh2_curve25519_new(NULL, &key_state->curve25519_public_key,
rc = _libssh2_curve25519_new(session, NULL, &key_state->curve25519_public_key,
&key_state->curve25519_private_key);
if( rc != 0 )