X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl_lib.c;h=485e17e73b7959122d440535c21139c12a9aaa96;hp=846b856af497c58d295a9b817684e1422d18f101;hb=e931f370aa38d8645b35fb8d6260cb44d37b6b61;hpb=38cfa99122f5c34b25e1671639be4446d0fa2b15 diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 846b856af4..485e17e73b 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -5115,7 +5115,7 @@ static int nss_keylog_int(const char *prefix, * hexadecimal, so we need a buffer that is twice their lengths. */ prefix_len = strlen(prefix); - out_len = prefix_len + (2*parameter_1_len) + (2*parameter_2_len) + 3; + out_len = prefix_len + (2 * parameter_1_len) + (2 * parameter_2_len) + 3; if ((out = cursor = OPENSSL_malloc(out_len)) == NULL) { SSLfatal(ssl, SSL_AD_INTERNAL_ERROR, SSL_F_NSS_KEYLOG_INT, ERR_R_MALLOC_FAILURE); @@ -5139,7 +5139,7 @@ static int nss_keylog_int(const char *prefix, *cursor = '\0'; ssl->ctx->keylog_callback(ssl, (const char *)out); - OPENSSL_free(out); + OPENSSL_clear_free(out, out_len); return 1; }