mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 12:35:04 -05:00
gnutls: fix memory leaks (certfields memory wasn't released)
Closes #6153
This commit is contained in:
parent
95d30409be
commit
8bcb23593e
@ -1225,13 +1225,18 @@ gtls_connect_step3(struct connectdata *conn,
|
|||||||
|
|
||||||
certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
|
certclock = gnutls_x509_crt_get_expiration_time(x509_cert);
|
||||||
showtime(data, "expire date", certclock);
|
showtime(data, "expire date", certclock);
|
||||||
|
|
||||||
|
gnutls_free(certfields.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = gnutls_x509_crt_get_issuer_dn2(x509_cert, &certfields);
|
rc = gnutls_x509_crt_get_issuer_dn2(x509_cert, &certfields);
|
||||||
if(rc)
|
if(rc)
|
||||||
infof(data, "Failed to get certificate issuer\n");
|
infof(data, "Failed to get certificate issuer\n");
|
||||||
else
|
else {
|
||||||
infof(data, "\t issuer: %s\n", certfields.data);
|
infof(data, "\t issuer: %s\n", certfields.data);
|
||||||
|
|
||||||
|
gnutls_free(certfields.data);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gnutls_x509_crt_deinit(x509_cert);
|
gnutls_x509_crt_deinit(x509_cert);
|
||||||
|
Loading…
Reference in New Issue
Block a user