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:51:26 +0000 (15:51 +0100)
commit689f112d9806fa4a0c2f8c108226639455bc770d
tree75fee6d0401ab4b03769f4d8c6b45b7b9c1d5cc0
parentde6ac50ddc6c901d43afcd914a1708f9b87efcf2
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)
crypto/init.c