diff options
author | Emilia Kasper <emilia@openssl.org> | 2015-09-01 16:11:47 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2015-09-01 20:01:55 +0200 |
commit | 08a721ac613d69217b474a61882971ae9d4586d1 (patch) | |
tree | d85f6c4110253398e6dcb335b6387424d6b96529 /apps/speed.c | |
parent | 394f7b6fcc38132b8ccff0a3253b9dd15640cfc0 (diff) | |
download | openssl-08a721ac613d69217b474a61882971ae9d4586d1.tar.gz |
apps/speed.c: fix memory leak
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/speed.c')
-rw-r--r-- | apps/speed.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/speed.c b/apps/speed.c index b4722f1a95..297ea521e3 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -575,7 +575,6 @@ int speed_main(int argc, char **argv) long c[ALGOR_NUM][SIZE_NUM], count = 0, save_count = 0; unsigned char *buf_malloc = NULL, *buf2_malloc = NULL; unsigned char *buf = NULL, *buf2 = NULL; - unsigned char *save_buf = NULL, *save_buf2 = NULL; unsigned char md[EVP_MAX_MD_SIZE]; #ifndef NO_FORK int multi = 0; @@ -2183,8 +2182,8 @@ int speed_main(int argc, char **argv) end: ERR_print_errors(bio_err); - OPENSSL_free(save_buf); - OPENSSL_free(save_buf2); + OPENSSL_free(buf_malloc); + OPENSSL_free(buf2_malloc); #ifndef OPENSSL_NO_RSA for (i = 0; i < RSA_NUM; i++) RSA_free(rsa_key[i]); @@ -2201,7 +2200,6 @@ int speed_main(int argc, char **argv) EC_KEY_free(ecdh_b[i]); } #endif - return (ret); } |