]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
doc: clarified expectations on gnutls_datum_t
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 14 Mar 2016 12:56:17 +0000 (13:56 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 14 Mar 2016 13:06:37 +0000 (14:06 +0100)
Relates #77

doc/cha-gtls-app.texi

index faa9c90f78d28fdf668a5a2b8dcd0e8f85d3addc..18eaf2c86fa068e314a9a424fece85112b9fae46 100644 (file)
@@ -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.