be more specific about what to free after gnutls_x509_crt_get_dn2 succeeds
Description of problem:
The documentation for gnutls_x509_crt_get_dn2()
and gnutls_x509_crt_get_issuer_dn2()
does not clearly specify what to do with the buffer that is returned. Yes it says it is allocated, but it does not specify whose responsibility it is to free it, nor does it specify exactly how it is to be freed.
This will easily lead to applications ending up leaking memory.
Version of gnutls used:
I checked the current live docs here: https://gnutls.org/reference/gnutls-x509.html#gnutls-x509-crt-get-dn2
Edited by Daniel Stenberg