apps/speed.c: Fix crash when config loading fails
authorVitezslav Cizek <vcizek@suse.com>
Thu, 24 Nov 2016 12:21:41 +0000 (13:21 +0100)
committerRich Salz <rsalz@openssl.org>
Sun, 27 Nov 2016 01:09:00 +0000 (20:09 -0500)
commitbe3a7ddef6c61ef59228acd2dd5e511e3334445c
tree42098b06bb3da17e3fd282abe1d42953fa557afe
parentc477f8e7165d30c5c8ca98f7409714f56dc2048c
apps/speed.c: Fix crash when config loading fails

Move rsa_key initialization in front of load_config().
If loading the config fails, rsa_key isn't initialized and may
cause invalid free() in the end: cleanup.
Remove superfluous memset.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
apps/speed.c