summaryrefslogtreecommitdiff
path: root/lib/x509/ocsp.c
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-02-23 22:21:09 +0000
committerTim Rühsen <tim.ruehsen@gmx.de>2019-02-23 22:21:09 +0000
commit115779ad2e3f27f8cc4b5ad9956a22a3921d6edd (patch)
tree0850345c8f43dbbc9b058cb8bba23038508b6933 /lib/x509/ocsp.c
parentc0af09dee671d90f69e40fdfa5e0117cd995ef18 (diff)
parent6b5cbc9ea5bdca704bdbe2f8fb551f720d634bc6 (diff)
downloadgnutls-115779ad2e3f27f8cc4b5ad9956a22a3921d6edd.tar.gz
Merge branch 'tmp-reset-after-free' into 'master'
Automatically NULLify after gnutls_free() See merge request gnutls/gnutls!923
Diffstat (limited to 'lib/x509/ocsp.c')
-rw-r--r--lib/x509/ocsp.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c
index a52c4aa428..a8edf30ec6 100644
--- a/lib/x509/ocsp.c
+++ b/lib/x509/ocsp.c
@@ -162,7 +162,6 @@ void gnutls_ocsp_resp_deinit(gnutls_ocsp_resp_t resp)
asn1_delete_structure(&resp->basicresp);
resp->resp = NULL;
- resp->response_type_oid.data = NULL;
resp->basicresp = NULL;
gnutls_free(resp->der.data);
@@ -299,7 +298,6 @@ gnutls_ocsp_resp_import2(gnutls_ocsp_resp_t resp,
}
gnutls_free(resp->der.data);
- resp->der.data = NULL;
}
resp->init = 1;
@@ -1668,18 +1666,12 @@ gnutls_ocsp_resp_get_single(gnutls_ocsp_resp_t resp,
return GNUTLS_E_SUCCESS;
fail:
- if (issuer_name_hash) {
+ if (issuer_name_hash)
gnutls_free(issuer_name_hash->data);
- issuer_name_hash->data = NULL;
- }
- if (issuer_key_hash) {
+ if (issuer_key_hash)
gnutls_free(issuer_key_hash->data);
- issuer_key_hash->data = NULL;
- }
- if (serial_number) {
+ if (serial_number)
gnutls_free(serial_number->data);
- serial_number->data = NULL;
- }
return ret;
}
@@ -1955,7 +1947,6 @@ gnutls_ocsp_resp_get_certs(gnutls_ocsp_resp_t resp,
}
gnutls_free(c.data);
- c.data = NULL;
}
tmpcerts[ctr] = NULL;