Fix two memory leaks: EVP_PKEY_get1_RSA() returns a referenced key
authorreyk <reyk@openbsd.org>
Tue, 6 May 2014 11:03:02 +0000 (11:03 +0000)
committerreyk <reyk@openbsd.org>
Tue, 6 May 2014 11:03:02 +0000 (11:03 +0000)
commit5a039c14f79bc499e0322a443065e96033b9b8ca
treea47c61aaa17186dce296d7f08f22fb8082f2b6c8
parent6e1880a370e900a61835ebbc2c8987bf2809accd
Fix two memory leaks: EVP_PKEY_get1_RSA() returns a referenced key
that requires to call RSA_free() to dereference it after use.  Also
free a temporary key that was read by PEM_read_PrivateKey() and
immediately written into a bio.

ok markus@
usr.sbin/relayd/ssl.c
usr.sbin/smtpd/ssl.c