diff options
author | Harry Sintonen <sintonen@iki.fi> | 2020-11-01 23:32:15 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-02 09:59:48 +0100 |
commit | 8bcb23593eac83501b6fa5b2bcae18ce011103c7 (patch) | |
tree | 4d834156ecacd08b57d46184fa6059265814ddc2 | |
parent | 95d30409becbcc45bba2488fdc9cceef9b32a2a5 (diff) | |
download | curl-8bcb23593eac83501b6fa5b2bcae18ce011103c7.tar.gz |
gnutls: fix memory leaks (certfields memory wasn't released)
Closes #6153
-rw-r--r-- | lib/vtls/gtls.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index ec3f8599b..b2febaa9e 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -1225,13 +1225,18 @@ gtls_connect_step3(struct connectdata *conn, certclock = gnutls_x509_crt_get_expiration_time(x509_cert); showtime(data, "expire date", certclock); + + gnutls_free(certfields.data); } rc = gnutls_x509_crt_get_issuer_dn2(x509_cert, &certfields); if(rc) infof(data, "Failed to get certificate issuer\n"); - else + else { infof(data, "\t issuer: %s\n", certfields.data); + + gnutls_free(certfields.data); + } #endif gnutls_x509_crt_deinit(x509_cert); |