summaryrefslogtreecommitdiff
path: root/lib/auth
diff options
context:
space:
mode:
Diffstat (limited to 'lib/auth')
-rw-r--r--lib/auth/rsa.c5
-rw-r--r--lib/auth/rsa_psk.c1
-rw-r--r--lib/auth/srp_sb64.c2
3 files changed, 2 insertions, 6 deletions
diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c
index d5d0943242..e58b0a1331 100644
--- a/lib/auth/rsa.c
+++ b/lib/auth/rsa.c
@@ -200,9 +200,8 @@ proc_rsa_client_kx(gnutls_session_t session, uint8_t * data,
ret = gnutls_rnd(GNUTLS_RND_NONCE, session->key.key.data,
GNUTLS_MASTER_SIZE);
if (ret < 0) {
- gnutls_free(session->key.key.data);
- session->key.key.data = NULL;
- session->key.key.size = 0;
+ gnutls_free(session->key.key.data);
+ session->key.key.size = 0;
gnutls_assert();
return ret;
}
diff --git a/lib/auth/rsa_psk.c b/lib/auth/rsa_psk.c
index 791fcd8bb7..387bfd403e 100644
--- a/lib/auth/rsa_psk.c
+++ b/lib/auth/rsa_psk.c
@@ -341,7 +341,6 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_session_t session, uint8_t * data,
("auth_rsa_psk: Possible PKCS #1 format attack\n");
if (ret >= 0) {
gnutls_free(plaintext.data);
- plaintext.data = NULL;
}
randomize_key = 1;
} else {
diff --git a/lib/auth/srp_sb64.c b/lib/auth/srp_sb64.c
index 1177e76719..7bfffdf070 100644
--- a/lib/auth/srp_sb64.c
+++ b/lib/auth/srp_sb64.c
@@ -263,7 +263,6 @@ _gnutls_sbase64_decode(char *data, size_t idata_size, uint8_t ** result)
tmp = decode(tmpres, datrev);
if (tmp < 0) {
gnutls_free((*result));
- *result = NULL;
return tmp;
}
@@ -277,7 +276,6 @@ _gnutls_sbase64_decode(char *data, size_t idata_size, uint8_t ** result)
tmp = decode(tmpres, (uint8_t *) & data[i]);
if (tmp < 0) {
gnutls_free((*result));
- *result = NULL;
return tmp;
}
memcpy(&(*result)[j], tmpres, tmp);