diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cert.c | 2 | ||||
-rw-r--r-- | tests/gnutls_session_set_id.c | 1 | ||||
-rw-r--r-- | tests/name-constraints-ip.c | 3 | ||||
-rw-r--r-- | tests/pkcs11/pkcs11-import-url-privkey.c | 2 | ||||
-rw-r--r-- | tests/pkcs11/pkcs11-privkey-always-auth.c | 2 | ||||
-rw-r--r-- | tests/pkcs11/pkcs11-privkey-fork-reinit.c | 1 | ||||
-rw-r--r-- | tests/pkcs11/pkcs11-privkey-fork.c | 1 | ||||
-rw-r--r-- | tests/pkcs11/pkcs11-privkey-safenet-always-auth.c | 2 | ||||
-rw-r--r-- | tests/pkcs7.c | 2 | ||||
-rw-r--r-- | tests/resume-dtls.c | 1 | ||||
-rw-r--r-- | tests/resume.c | 1 | ||||
-rw-r--r-- | tests/sign-verify-data.c | 1 | ||||
-rw-r--r-- | tests/sign-verify-ext.c | 2 | ||||
-rw-r--r-- | tests/sign-verify-ext4.c | 2 | ||||
-rw-r--r-- | tests/sign-verify.c | 1 | ||||
-rw-r--r-- | tests/x509-extensions.c | 1 | ||||
-rw-r--r-- | tests/x509sign-verify-error.c | 1 |
17 files changed, 1 insertions, 25 deletions
diff --git a/tests/cert.c b/tests/cert.c index da0ab23df4..ec566a4a4a 100644 --- a/tests/cert.c +++ b/tests/cert.c @@ -89,7 +89,6 @@ static int getnextcert(DIR **dirp, gnutls_datum_t *der, int *exp_ret) *exp_ret = atoi((char*)local.data); success("expecting error code %d\n", *exp_ret); gnutls_free(local.data); - local.data = NULL; } return 0; @@ -135,7 +134,6 @@ void doit(void) gnutls_x509_crt_deinit(cert); gnutls_free(der.data); - der.data = NULL; der.size = 0; exp_ret = -1; } diff --git a/tests/gnutls_session_set_id.c b/tests/gnutls_session_set_id.c index 8de45892fb..e0e167ed27 100644 --- a/tests/gnutls_session_set_id.c +++ b/tests/gnutls_session_set_id.c @@ -200,7 +200,6 @@ static void start(const char *test, unsigned try_resume) gnutls_certificate_free_credentials(clientx509cred); gnutls_free(dbdata.data); - dbdata.data = NULL; dbdata.size = 0; } diff --git a/tests/name-constraints-ip.c b/tests/name-constraints-ip.c index 3dd4ff2cb2..ed96109c7a 100644 --- a/tests/name-constraints-ip.c +++ b/tests/name-constraints-ip.c @@ -78,7 +78,6 @@ static void check_test_result(int ret, int expected_outcome, static void parse_cidr(const char* cidr, gnutls_datum_t *datum) { if (datum->data != NULL) { gnutls_free(datum->data); - datum->data = NULL; } int ret = gnutls_x509_cidr_to_rfc5280(cidr, datum); check_for_error(ret); @@ -699,7 +698,7 @@ static int teardown(void **state) { gnutls_free(test_vars->ip.data); gnutls_x509_name_constraints_deinit(test_vars->nc); gnutls_x509_name_constraints_deinit(test_vars->nc2); - gnutls_free(test_vars); + gnutls_free(*state); return 0; } diff --git a/tests/pkcs11/pkcs11-import-url-privkey.c b/tests/pkcs11/pkcs11-import-url-privkey.c index 38d40b666d..ded8c9a75e 100644 --- a/tests/pkcs11/pkcs11-import-url-privkey.c +++ b/tests/pkcs11/pkcs11-import-url-privkey.c @@ -91,7 +91,6 @@ void doit(void) for (i=0;i<obj_list_size;i++) gnutls_pkcs11_obj_deinit(obj_list[i]); gnutls_free(obj_list); - obj_list = NULL; obj_list_size = 0; #ifndef _WIN32 @@ -122,7 +121,6 @@ void doit(void) for (i=0;i<obj_list_size;i++) gnutls_pkcs11_obj_deinit(obj_list[i]); gnutls_free(obj_list); - obj_list = NULL; obj_list_size = 0; } #endif diff --git a/tests/pkcs11/pkcs11-privkey-always-auth.c b/tests/pkcs11/pkcs11-privkey-always-auth.c index 3561c412fd..441f637225 100644 --- a/tests/pkcs11/pkcs11-privkey-always-auth.c +++ b/tests/pkcs11/pkcs11-privkey-always-auth.c @@ -175,7 +175,6 @@ void doit(void) pin_called = 0; gnutls_free(sig.data); - sig.data = NULL; /* call again - should re-authenticate */ ret = gnutls_privkey_sign_hash(key, GNUTLS_DIG_SHA1, 0, &data, &sig); @@ -190,7 +189,6 @@ void doit(void) pin_called = 0; gnutls_free(sig.data); - sig.data = NULL; if (debug) printf("done\n\n\n"); diff --git a/tests/pkcs11/pkcs11-privkey-fork-reinit.c b/tests/pkcs11/pkcs11-privkey-fork-reinit.c index 1535d644f9..a725842257 100644 --- a/tests/pkcs11/pkcs11-privkey-fork-reinit.c +++ b/tests/pkcs11/pkcs11-privkey-fork-reinit.c @@ -123,7 +123,6 @@ void doit(void) } gnutls_free(sig.data); - sig.data = NULL; pid = fork(); if (pid != 0) { diff --git a/tests/pkcs11/pkcs11-privkey-fork.c b/tests/pkcs11/pkcs11-privkey-fork.c index 9d301d7d62..b99755c73b 100644 --- a/tests/pkcs11/pkcs11-privkey-fork.c +++ b/tests/pkcs11/pkcs11-privkey-fork.c @@ -123,7 +123,6 @@ void doit(void) } gnutls_free(sig.data); - sig.data = NULL; pid = fork(); if (pid != 0) { diff --git a/tests/pkcs11/pkcs11-privkey-safenet-always-auth.c b/tests/pkcs11/pkcs11-privkey-safenet-always-auth.c index 1b5b34054d..a4ab5b5aa3 100644 --- a/tests/pkcs11/pkcs11-privkey-safenet-always-auth.c +++ b/tests/pkcs11/pkcs11-privkey-safenet-always-auth.c @@ -157,7 +157,6 @@ void doit(void) pin_called = 0; gnutls_free(sig.data); - sig.data = NULL; /* call again - should re-authenticate */ ret = gnutls_privkey_sign_hash(key, GNUTLS_DIG_SHA1, 0, &data, &sig); @@ -172,7 +171,6 @@ void doit(void) pin_called = 0; gnutls_free(sig.data); - sig.data = NULL; if (debug) printf("done\n\n\n"); diff --git a/tests/pkcs7.c b/tests/pkcs7.c index a490976fc5..2d5a5548d4 100644 --- a/tests/pkcs7.c +++ b/tests/pkcs7.c @@ -90,7 +90,6 @@ static int getnextfile(DIR **dirp, gnutls_datum_t *der, int *exp_ret) *exp_ret = atoi((char*)local.data); success("expecting error code %d\n", *exp_ret); gnutls_free(local.data); - local.data = NULL; } return 0; @@ -134,7 +133,6 @@ void doit(void) gnutls_pkcs7_deinit(cert); gnutls_free(der.data); - der.data = NULL; der.size = 0; exp_ret = -1; } diff --git a/tests/resume-dtls.c b/tests/resume-dtls.c index 9e6327c7fe..b5b214313a 100644 --- a/tests/resume-dtls.c +++ b/tests/resume-dtls.c @@ -363,7 +363,6 @@ static void server(int sds[], struct params_res *params) } gnutls_free(session_ticket_key.data); - session_ticket_key.data = NULL; gnutls_anon_free_server_credentials(anoncred); if (debug) diff --git a/tests/resume.c b/tests/resume.c index 0a3b20eac8..381f32da6a 100644 --- a/tests/resume.c +++ b/tests/resume.c @@ -900,7 +900,6 @@ static void server(int sds[], struct params_res *params) } gnutls_free(session_ticket_key.data); - session_ticket_key.data = NULL; if (debug) success("server: finished\n"); diff --git a/tests/sign-verify-data.c b/tests/sign-verify-data.c index 3aa2611755..558ad22530 100644 --- a/tests/sign-verify-data.c +++ b/tests/sign-verify-data.c @@ -153,7 +153,6 @@ void doit(void) /* test the raw interface */ gnutls_free(signature.data); - signature.data = NULL; gnutls_free(signature.data); gnutls_x509_crt_deinit(crt); diff --git a/tests/sign-verify-ext.c b/tests/sign-verify-ext.c index eecb1f357b..cc80bf907f 100644 --- a/tests/sign-verify-ext.c +++ b/tests/sign-verify-ext.c @@ -186,9 +186,7 @@ void doit(void) /* test the raw interface */ gnutls_free(signature.data); - signature.data = NULL; gnutls_free(signature2.data); - signature2.data = NULL; if (gnutls_pubkey_get_pk_algorithm(pubkey, NULL) == GNUTLS_PK_RSA) { diff --git a/tests/sign-verify-ext4.c b/tests/sign-verify-ext4.c index 81aa345bf0..be582ec148 100644 --- a/tests/sign-verify-ext4.c +++ b/tests/sign-verify-ext4.c @@ -227,7 +227,6 @@ void doit(void) testfail("gnutls_pubkey_verify_data2\n"); gnutls_free(signature.data); - signature.data = NULL; if (!tests[i].data_only) { @@ -243,7 +242,6 @@ void doit(void) testfail("gnutls_pubkey_verify_hash2-1 (hashed data)\n"); gnutls_free(signature2.data); - signature2.data = NULL; } if (gnutls_pubkey_get_pk_algorithm(pubkey, NULL) == diff --git a/tests/sign-verify.c b/tests/sign-verify.c index 1fbed5ece2..5a14741fc6 100644 --- a/tests/sign-verify.c +++ b/tests/sign-verify.c @@ -206,7 +206,6 @@ void doit(void) /* test the raw interface */ gnutls_free(signature.data); - signature.data = NULL; if (gnutls_pubkey_get_pk_algorithm(pubkey, NULL) == GNUTLS_PK_RSA) { diff --git a/tests/x509-extensions.c b/tests/x509-extensions.c index d480f83646..a062c1ba8a 100644 --- a/tests/x509-extensions.c +++ b/tests/x509-extensions.c @@ -767,7 +767,6 @@ void doit(void) } } gnutls_free(ext.data); - ext.data = NULL; } if (debug) diff --git a/tests/x509sign-verify-error.c b/tests/x509sign-verify-error.c index 54bdc40abe..97c9666859 100644 --- a/tests/x509sign-verify-error.c +++ b/tests/x509sign-verify-error.c @@ -181,7 +181,6 @@ void doit(void) fail("gnutls_privkey_sign_hash\n"); gnutls_free(signature2.data); - signature2.data = NULL; _gnutls_lib_simulate_error(); ret = gnutls_privkey_sign_hash(privkey, GNUTLS_DIG_SHA1, 0, |