From: Nikos Mavrogiannopoulos Date: Mon, 14 Mar 2016 12:56:17 +0000 (+0100) Subject: doc: clarified expectations on gnutls_datum_t X-Git-Tag: gnutls_3_5_0~256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f28046c86868d160c456ffd7c6aea5637bb7def;p=thirdparty%2Fgnutls.git doc: clarified expectations on gnutls_datum_t Relates #77 --- diff --git a/doc/cha-gtls-app.texi b/doc/cha-gtls-app.texi index faa9c90f78..18eaf2c86f 100644 --- a/doc/cha-gtls-app.texi +++ b/doc/cha-gtls-app.texi @@ -124,6 +124,12 @@ shown below. } gnutls_datum_t; @end verbatim +In functions where this structure is a returned type, if the function succeeds, +it is expected from the caller to use @code{gnutls_free()} to deinitialize the +data element after use, unless otherwise specified. If the function fails, the +contents of the @code{gnutls_datum_t} should be considered undefined and must +not be deinitialized. + Other functions that require data for scattered read use a structure similar to @code{struct iovec} typically used by @funcintref{readv}. It is shown below.