mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
tests: Avoid needless free and fix formatting
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -275,14 +275,12 @@ import_pubkey_without_loading_public_uri(void **state, const char *label)
|
||||
rc = ssh_pki_export_pubkey_blob(privkey, &pblob);
|
||||
assert_int_not_equal(rc, 0);
|
||||
assert_null(pblob);
|
||||
ssh_string_free(pblob);
|
||||
|
||||
rc = ssh_pki_export_privkey_to_pubkey(privkey, &pubkey);
|
||||
assert_int_not_equal(rc, 0);
|
||||
assert_null(pubkey);
|
||||
|
||||
SSH_KEY_FREE(privkey);
|
||||
SSH_KEY_FREE(pubkey);
|
||||
}
|
||||
|
||||
static void torture_pki_ecdsa_import_pubkey_without_loading_public_uri_256(void **state)
|
||||
@@ -547,9 +545,6 @@ static void torture_pki_ecdsa_import_pubkey_uri_invalid_configurations(void **st
|
||||
&pubkey);
|
||||
assert_int_not_equal(rc, 0);
|
||||
assert_null(pubkey);
|
||||
|
||||
SSH_KEY_FREE(privkey);
|
||||
SSH_KEY_FREE(pubkey);
|
||||
}
|
||||
|
||||
int torture_run_tests(void) {
|
||||
|
||||
@@ -273,9 +273,6 @@ static void torture_pki_rsa_uri_invalid_configurations(void **state)
|
||||
&privkey);
|
||||
assert_int_not_equal(rc, 0);
|
||||
assert_null(privkey);
|
||||
|
||||
SSH_KEY_FREE(pubkey);
|
||||
SSH_KEY_FREE(privkey);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user