Skip to content
Snippets Groups Projects
Commit 242a7f9c authored by Tristan Matthews's avatar Tristan Matthews Committed by Alexandre Lision
Browse files

tls: fix use-after-free bug

Refs #51340

Change-Id: Iab2cea27b3fe895d2553885804bfa212f9a6ad92
parent 790c2a2b
Branches
Tags
No related merge requests found
......@@ -181,6 +181,7 @@ static unsigned char *crypto_cert_read(const char *path, size_t *out_len)
err = gnutls_x509_crt_export(cert, GNUTLS_X509_FMT_DER, data, out_len);
if (err != GNUTLS_E_SUCCESS) {
free(data);
data = NULL;
*out_len = 0;
ERROR("Certificate %s could not be exported - %s.\n",
path, gnutls_strerror(err));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment