mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
tests: Do not leak memory when freeing ed25519 keys
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -478,8 +478,8 @@ static void torture_pki_ed25519_privkey_dup(void **state)
|
||||
dup = ssh_key_dup(key);
|
||||
assert_non_null(dup);
|
||||
|
||||
SAFE_FREE(key);
|
||||
SAFE_FREE(dup);
|
||||
ssh_key_free(key);
|
||||
ssh_key_free(dup);
|
||||
}
|
||||
|
||||
static void torture_pki_ed25519_pubkey_dup(void **state)
|
||||
@@ -515,8 +515,8 @@ static void torture_pki_ed25519_pubkey_dup(void **state)
|
||||
assert_true(rc == 1);
|
||||
|
||||
SAFE_FREE(pub_str);
|
||||
SAFE_FREE(pubkey);
|
||||
SAFE_FREE(dup);
|
||||
ssh_key_free(pubkey);
|
||||
ssh_key_free(dup);
|
||||
}
|
||||
|
||||
int torture_run_tests(void) {
|
||||
|
||||
Reference in New Issue
Block a user