Don't leak memory from ERR_add_error_vdata()
authorMatt Caswell <matt@openssl.org>
Mon, 28 Jan 2019 17:17:59 +0000 (17:17 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 29 Jan 2019 11:08:18 +0000 (11:08 +0000)
If the call the ERR_set_error_data() in ERR_add_error_vdata() fails then
a mem leak can occur. This commit checks that we successfully added the
error data, and if not frees the buffer.

Fixes #8085

Reviewed-by: Paul Yang <yang.yang@baishancloud.com>
(Merged from https://github.com/openssl/openssl/pull/8105)


No differences found