aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unittests/torture_options.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unittests/torture_options.c b/tests/unittests/torture_options.c
index ca85ec23..ba2fad5f 100644
--- a/tests/unittests/torture_options.c
+++ b/tests/unittests/torture_options.c
@@ -219,8 +219,8 @@ static void torture_bind_options_import_key(void **state)
{
ssh_bind bind = *state;
int rc;
- ssh_key key = ssh_key_new();
const char *base64_key;
+ ssh_key key = ssh_key_new();
/* set null */
rc = ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, NULL);
@@ -228,6 +228,7 @@ static void torture_bind_options_import_key(void **state)
/* set invalid key */
rc = ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, key);
assert_int_equal(rc, -1);
+ ssh_key_free(key);
/* set rsa key */
base64_key = torture_get_testkey(SSH_KEYTYPE_RSA, 0, 0);