Fixed memory leak if BUF_MEM_grow fails
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
This commit is contained in:
parent
6806b69084
commit
bb1ddd3d9a
2 changed files with 2 additions and 0 deletions
|
@ -251,6 +251,7 @@ int dtls1_accept(SSL *s)
|
|||
}
|
||||
if (!BUF_MEM_grow(buf,SSL3_RT_MAX_PLAIN_LENGTH))
|
||||
{
|
||||
BUF_MEM_free(buf);
|
||||
ret= -1;
|
||||
goto end;
|
||||
}
|
||||
|
|
|
@ -192,6 +192,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…
Reference in a new issue