tests: Replace ssh_string_free() with SSH_STRING_FREE()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
2eaa23a20e
Коммит
ca7da823c3
@ -125,7 +125,7 @@ static void torture_ssh_buffer_get_ssh_string(void **state) {
|
||||
for(l=0;l<k;++l){
|
||||
ssh_string str = ssh_buffer_get_ssh_string(buffer);
|
||||
assert_null(str);
|
||||
ssh_string_free(str);
|
||||
SSH_STRING_FREE(str);
|
||||
}
|
||||
ssh_buffer_free(buffer);
|
||||
}
|
||||
@ -161,7 +161,7 @@ static void torture_ssh_buffer_add_format(void **state) {
|
||||
assert_int_equal(len, sizeof(verif) - 1);
|
||||
assert_memory_equal(ssh_buffer_get(buffer), verif, sizeof(verif) -1);
|
||||
|
||||
ssh_string_free(s);
|
||||
SSH_STRING_FREE(s);
|
||||
}
|
||||
|
||||
static void torture_ssh_buffer_get_format(void **state) {
|
||||
|
@ -111,7 +111,7 @@ static void torture_pubkey_from_file(void **state) {
|
||||
|
||||
assert_true(rc == 0);
|
||||
|
||||
ssh_string_free(pubkey);
|
||||
SSH_STRING_FREE(pubkey);
|
||||
|
||||
/* test if it returns 1 if pubkey doesn't exist */
|
||||
unlink(LIBSSH_RSA_TESTKEY ".pub");
|
||||
@ -210,8 +210,8 @@ static void torture_pubkey_generate_from_privkey(void **state) {
|
||||
|
||||
assert_string_equal(pubkey_line_orig, pubkey_line_new);
|
||||
|
||||
ssh_string_free(pubkey_orig);
|
||||
ssh_string_free(pubkey_new);
|
||||
SSH_STRING_FREE(pubkey_orig);
|
||||
SSH_STRING_FREE(pubkey_new);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -441,7 +441,7 @@ static void torture_pki_ed25519_sign(void **state)
|
||||
/* ssh_print_hexa("signature", ssh_string_data(blob), ssh_string_len(blob)); */
|
||||
ssh_signature_free(sig);
|
||||
SSH_KEY_FREE(privkey);
|
||||
ssh_string_free(blob);
|
||||
SSH_STRING_FREE(blob);
|
||||
|
||||
}
|
||||
|
||||
@ -473,7 +473,7 @@ static void torture_pki_ed25519_verify(void **state){
|
||||
/* alter signature and expect false result */
|
||||
|
||||
SSH_KEY_FREE(pubkey);
|
||||
ssh_string_free(blob);
|
||||
SSH_STRING_FREE(blob);
|
||||
free(pkey_ptr);
|
||||
}
|
||||
|
||||
@ -509,7 +509,7 @@ static void torture_pki_ed25519_verify_bad(void **state){
|
||||
|
||||
}
|
||||
SSH_KEY_FREE(pubkey);
|
||||
ssh_string_free(blob);
|
||||
SSH_STRING_FREE(blob);
|
||||
free(pkey_ptr);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ static void *thread_ssh_buffer_get_ssh_string(void *threadid)
|
||||
for (l = 0; l < k; ++l) {
|
||||
ssh_string str = ssh_buffer_get_ssh_string(buffer);
|
||||
assert_null(str);
|
||||
ssh_string_free(str);
|
||||
SSH_STRING_FREE(str);
|
||||
}
|
||||
ssh_buffer_free(buffer);
|
||||
}
|
||||
@ -316,7 +316,7 @@ static void *thread_ssh_buffer_add_format(void *threadid)
|
||||
assert_int_equal(len, sizeof(verif) - 1);
|
||||
assert_memory_equal(ssh_buffer_get(buffer), verif, sizeof(verif) -1);
|
||||
|
||||
ssh_string_free(s);
|
||||
SSH_STRING_FREE(s);
|
||||
|
||||
/* Teardown */
|
||||
ssh_buffer_free(buffer);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user