Don't leave stale errors on queue if DSO_dsobyaddr() fails
authorMatt Caswell <matt@openssl.org>
Thu, 4 May 2017 11:51:18 +0000 (12:51 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 4 May 2017 14:55:34 +0000 (15:55 +0100)
commitccceda842e3cc9f97059502b8597bad52fe4bf50
treebda7041ffea54cdd6a39300b42397c680daba034
parent6e7e171d0a02cf2b45c3122a952e62fe3cc7d5c7
Don't leave stale errors on queue if DSO_dsobyaddr() fails

The init code uses DSO_dsobyaddr() to leak a reference to ourselves to
ensure we remain loaded until atexit() time. In some circumstances that
can fail and leave stale errors on the error queue.

Fixes #3372

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3383)
(cherry picked from commit 689f112d9806fa4a0c2f8c108226639455bc770d)
crypto/init.c