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:
J Mohan Rao Arisankala 2016-02-23 20:20:50 +05:30 committed by Rich Salz
parent 6b2ebe4332
commit a44a208442

View File

@ -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);
}