Fixed memory leak if BUF_MEM_grow fails
[openssl.git] / ssl / d1_srvr.c
index 139f5f39a4130c495db3966fe2180faad96471e6..a14fb43138b1997662a41022a70990dbbaaef9f3 100644 (file)
@@ -209,6 +209,7 @@ int dtls1_accept(SSL *s)
                                        }
                                if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
                                        {
+                                       BUF_MEM_free(buf);
                                        ret= -1;
                                        goto end;
                                        }