Only release thread-local key if we created it.
authorRich Salz <rsalz@openssl.org>
Wed, 31 May 2017 16:14:55 +0000 (12:14 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 5 Jun 2017 12:05:03 +0000 (08:05 -0400)
commitc8ec34109cab8c92685958ddfef0776a4b3b8460
tree31794e88a15eec1cf6599f566352b9d62a01646d
parent3dbd32c4fe7cba6abb0e2b71313185d0a908478f
Only release thread-local key if we created it.

Thanks to Jan Alexander Steffens for finding the bug and confirming the
fix.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3592)
(cherry picked from commit 73bc53708c386c1ea85941d345721e23dc61c05c)
crypto/err/err.c