From f54be57e11c5c418ab659b5547ed9b704371a45c Mon Sep 17 00:00:00 2001 From: Emeric Date: Thu, 12 Jul 2012 14:54:05 +0200 Subject: [PATCH] FIX: Should never append but can cause memory leak. --- shctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shctx.c b/shctx.c index 081c08d..0bafb54 100644 --- a/shctx.c +++ b/shctx.c @@ -173,7 +173,7 @@ int shctx_new_cb(SSL *ssl, SSL_SESSION *sess) { /* check if session reserved size in aligned buffer is large enougth for the ASN1 encode session */ data_len=i2d_SSL_SESSION(sess, NULL); if(data_len > SHSESS_MAX_DATA_LEN) - return 1; + return 0; /* process ASN1 session encoding before the lock: lower cost */ p = data = encsess+SSL_MAX_SSL_SESSION_ID_LENGTH;