summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/ssl/ssl_asn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/ssl/ssl_asn1.c')
-rw-r--r--crypto/openssl/ssl/ssl_asn1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/openssl/ssl/ssl_asn1.c b/crypto/openssl/ssl/ssl_asn1.c
index 35cc27c..499f0e8 100644
--- a/crypto/openssl/ssl/ssl_asn1.c
+++ b/crypto/openssl/ssl/ssl_asn1.c
@@ -527,6 +527,9 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
if (os.length > SSL_MAX_SID_CTX_LENGTH) {
c.error = SSL_R_BAD_LENGTH;
c.line = __LINE__;
+ OPENSSL_free(os.data);
+ os.data = NULL;
+ os.length = 0;
goto err;
} else {
ret->sid_ctx_length = os.length;
OpenPOWER on IntegriCloud