[gnutls-devel] GnuTLS | be more specific about what to free after gnutls_x509_crt_get_dn2 succeeds (#1110)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sun Nov 1 23:23:35 CET 2020



Daniel Stenberg created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1110



## Description of problem:

The documentation for `gnutls_x509_crt_get_dn2()` and `gnutls_x509_crt_get_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

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1110
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20201101/bcee1150/attachment-0001.html>


More information about the Gnutls-devel mailing list