Fixed memory leak in the event of a failure of BUF_MEM_grow
authorMatt Caswell <matt@openssl.org>
Thu, 4 Dec 2014 09:56:16 +0000 (09:56 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 8 Dec 2014 16:43:25 +0000 (16:43 +0000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/s3_srvr.c

index f95f9c7..a2eebbb 100644 (file)
@@ -294,6 +294,7 @@ int ssl3_accept(SSL *s)
                                        }
                                if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
                                        {
+                                       BUF_MEM_free(buf);
                                        ret= -1;
                                        goto end;
                                        }