From 3e58e478563640a0cc03f0e58536fc4185750b90 Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Wed, 5 Apr 2023 15:12:43 -0400 Subject: [PATCH] Documentation fixup for wolfSSL_get_chain_cert(); --- doc/dox_comments/header_files/ssl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/dox_comments/header_files/ssl.h b/doc/dox_comments/header_files/ssl.h index 6a06cb82e..03ddb76e5 100644 --- a/doc/dox_comments/header_files/ssl.h +++ b/doc/dox_comments/header_files/ssl.h @@ -6368,6 +6368,9 @@ unsigned char* wolfSSL_get_chain_cert(WOLFSSL_X509_CHAIN* chain, int idx); memory SESSION_CACHE. \param idx the index of the WOLFSSL_X509 certificate. + Note that it is the user's responsibility to free the returned memory + by calling wolfSSL_FreeX509(). + _Example_ \code WOLFSSL_X509_CHAIN* chain = &session->chain; @@ -6377,9 +6380,10 @@ unsigned char* wolfSSL_get_chain_cert(WOLFSSL_X509_CHAIN* chain, int idx); prt = wolfSSL_get_chain_X509(chain, idx); if(ptr != NULL){ - //ptr contains the cert at the index specified + // ptr contains the cert at the index specified + wolfSSL_FreeX509(ptr); } else { - // ptr is NULL + // ptr is NULL } \endcode