aboutsummaryrefslogtreecommitdiff
path: root/openssl/apps/speed.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-04-20 23:05:23 +0200
committermarha <marha@users.sourceforge.net>2015-04-20 23:05:23 +0200
commit0f7871ff824bcf064db3ab6bdfe26645ba6c8087 (patch)
tree90d3d2b6112e083289c9cf68146852087814f6d3 /openssl/apps/speed.c
parent934184bfecd402aae891b8740d788b486aa7269f (diff)
parent2a00e489122f6c4b525090dbdba2855a2ea2d519 (diff)
downloadvcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.tar.gz
vcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.tar.bz2
vcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.zip
Merge remote-tracking branch 'origin/released'
Conflicts: openssl/Makefile
Diffstat (limited to 'openssl/apps/speed.c')
-rw-r--r--openssl/apps/speed.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/openssl/apps/speed.c b/openssl/apps/speed.c
index 7dcd354e0..7b1acc189 100644
--- a/openssl/apps/speed.c
+++ b/openssl/apps/speed.c
@@ -2775,6 +2775,11 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
inp = OPENSSL_malloc(mblengths[num - 1]);
out = OPENSSL_malloc(mblengths[num - 1] + 1024);
+ if(!inp || !out) {
+ BIO_printf(bio_err,"Out of memory\n");
+ goto end;
+ }
+
EVP_CIPHER_CTX_init(&ctx);
EVP_EncryptInit_ex(&ctx, evp_cipher, NULL, no_key, no_iv);
@@ -2859,7 +2864,10 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher)
fprintf(stdout, "\n");
}
- OPENSSL_free(inp);
- OPENSSL_free(out);
+end:
+ if(inp)
+ OPENSSL_free(inp);
+ if(out)
+ OPENSSL_free(out);
}
#endif