From a44a208442ecf8f576c9e364f8b46b6661c7d2de Mon Sep 17 00:00:00 2001 From: J Mohan Rao Arisankala Date: Tue, 23 Feb 2016 20:20:50 +0530 Subject: [PATCH] GH735: remove unnecessary allocation Removing code, where memory was getting allocated for an unused variable Signed-off-by: Rich Salz Reviewed-by: Matt Caswell --- ssl/t1_enc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 6b3a73e39e..1b2820bff9 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -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); } -- 2.25.1