mirror of
https://github.com/openssl/openssl.git
synced 2025-03-19 19:50:42 +08:00
GH735: remove unnecessary allocation
Removing code, where memory was getting allocated for an unused variable Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
6b2ebe4332
commit
a44a208442
@ -648,15 +648,10 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen,
|
||||
const unsigned char *context,
|
||||
size_t contextlen, int use_context)
|
||||
{
|
||||
unsigned char *buff;
|
||||
unsigned char *val = NULL;
|
||||
size_t vallen = 0, currentvalpos;
|
||||
int rv;
|
||||
|
||||
buff = OPENSSL_malloc(olen);
|
||||
if (buff == NULL)
|
||||
goto err2;
|
||||
|
||||
/*
|
||||
* construct PRF arguments we construct the PRF argument ourself rather
|
||||
* than passing separate values into the TLS PRF to ensure that the
|
||||
@ -729,7 +724,6 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen,
|
||||
rv = 0;
|
||||
ret:
|
||||
OPENSSL_clear_free(val, vallen);
|
||||
OPENSSL_clear_free(buff, olen);
|
||||
return (rv);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user