From 176fe0d0366f75619dbed0d81b1f961b403d1cf1 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Tue, 20 Jun 2017 12:31:54 +0200 Subject: [PATCH] Replace OPENSSL_{malloc,free} with the standard C versions --- src/openrct2/network/NetworkKey.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/network/NetworkKey.cpp b/src/openrct2/network/NetworkKey.cpp index a6b241a6fa..ff18414ed4 100644 --- a/src/openrct2/network/NetworkKey.cpp +++ b/src/openrct2/network/NetworkKey.cpp @@ -385,7 +385,7 @@ bool NetworkKey::Sign(const uint8 * md, const size_t len, char ** signature, siz uint8 * sig; /* Allocate memory for the signature based on size in slen */ - if ((sig = (unsigned char*)OPENSSL_malloc((sint32)(sizeof(unsigned char) * (*out_size)))) == NULL) + if ((sig = (unsigned char*)malloc((sint32)(sizeof(unsigned char) * (*out_size)))) == NULL) { log_error("Failed to crypto-allocate space for signature"); EVP_MD_CTX_destroy(mdctx); @@ -395,12 +395,12 @@ bool NetworkKey::Sign(const uint8 * md, const size_t len, char ** signature, siz if (1 != EVP_DigestSignFinal(mdctx, sig, out_size)) { log_error("Failed to finalise signature"); EVP_MD_CTX_destroy(mdctx); - OPENSSL_free(sig); + free(sig); return false; } *signature = new char[*out_size]; memcpy(*signature, sig, *out_size); - OPENSSL_free(sig); + free(sig); EVP_MD_CTX_destroy(mdctx); return true;