mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +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);
|
dup = ssh_key_dup(key);
|
||||||
assert_non_null(dup);
|
assert_non_null(dup);
|
||||||
|
|
||||||
SAFE_FREE(key);
|
ssh_key_free(key);
|
||||||
SAFE_FREE(dup);
|
ssh_key_free(dup);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void torture_pki_ed25519_pubkey_dup(void **state)
|
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);
|
assert_true(rc == 1);
|
||||||
|
|
||||||
SAFE_FREE(pub_str);
|
SAFE_FREE(pub_str);
|
||||||
SAFE_FREE(pubkey);
|
ssh_key_free(pubkey);
|
||||||
SAFE_FREE(dup);
|
ssh_key_free(dup);
|
||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
|
|||||||
Reference in New Issue
Block a user