Fixed memory leak if BUF_MEM_grow fails
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org> (cherry picked from commit bb1ddd3d9a0d01656b90693a214b911995a5fe8c)
This commit is contained in:
parent
af8a66d10d
commit
c313270836
@ -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;
|
||||
}
|
||||
|
@ -185,6 +185,7 @@ int ssl23_accept(SSL *s)
|
||||
}
|
||||
if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
|
||||
{
|
||||
BUF_MEM_free(buf);
|
||||
ret= -1;
|
||||
goto end;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user