mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
tests: Use SSH_STRING_FREE_CHAR
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 143b5e2e50)
This commit is contained in:
committed by
Andreas Schneider
parent
c6c63030c5
commit
4269b62153
@@ -170,21 +170,21 @@ static void torture_config_from_file(void **state) {
|
||||
assert_non_null(v);
|
||||
|
||||
assert_string_equal(v, PROXYCMD);
|
||||
ssh_string_free_char(v);
|
||||
SSH_STRING_FREE_CHAR(v);
|
||||
|
||||
ret = ssh_options_get(session, SSH_OPTIONS_IDENTITY, &v);
|
||||
assert_true(ret == 0);
|
||||
assert_non_null(v);
|
||||
|
||||
assert_string_equal(v, ID_FILE);
|
||||
ssh_string_free_char(v);
|
||||
SSH_STRING_FREE_CHAR(v);
|
||||
|
||||
ret = ssh_options_get(session, SSH_OPTIONS_USER, &v);
|
||||
assert_true(ret == 0);
|
||||
assert_non_null(v);
|
||||
|
||||
assert_string_equal(v, USERNAME);
|
||||
ssh_string_free_char(v);
|
||||
SSH_STRING_FREE_CHAR(v);
|
||||
|
||||
assert_string_equal(session->opts.wanted_methods[SSH_KEX], KEXALGORITHMS);
|
||||
|
||||
@@ -223,14 +223,14 @@ static void torture_config_glob(void **state) {
|
||||
assert_non_null(v);
|
||||
|
||||
assert_string_equal(v, PROXYCMD);
|
||||
ssh_string_free_char(v);
|
||||
SSH_STRING_FREE_CHAR(v);
|
||||
|
||||
ret = ssh_options_get(session, SSH_OPTIONS_IDENTITY, &v);
|
||||
assert_true(ret == 0);
|
||||
assert_non_null(v);
|
||||
|
||||
assert_string_equal(v, ID_FILE);
|
||||
ssh_string_free_char(v);
|
||||
SSH_STRING_FREE_CHAR(v);
|
||||
#endif /* HAVE_GLOB */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user