From 3130145213c7fdcca0981a118757e4282bf36030 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 6 Nov 2014 16:07:05 -0800 Subject: [PATCH] Added note to SSL_ResourceFree() --- src/internal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/internal.c b/src/internal.c index d53cdf80d..65b07667a 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1937,6 +1937,12 @@ void FreeArrays(CYASSL* ssl, int keep) /* In case holding SSL object in array and don't want to free actual ssl */ void SSL_ResourceFree(CYASSL* ssl) { + /* Note: any resources used during the handshake should be released in the + * function FreeHandshakeResources(). Be careful with the special cases + * like the RNG which may optionally be kept for the whole session. (For + * example with the RNG, it isn't used beyond the handshake except when + * using stream ciphers where it is retained. */ + FreeCiphers(ssl); FreeArrays(ssl, 0); #if defined(HAVE_HASHDRBG) || defined(NO_RC4)