Fix mem leaks during auto-deinit
authorMatt Caswell <matt@openssl.org>
Mon, 5 Sep 2016 13:12:58 +0000 (14:12 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 8 Sep 2016 11:40:19 +0000 (12:40 +0100)
commit135648bcd0e9db029582d3d7627a90a1b566c5d6
tree9f27d7c5bc25abe4355872360aa99ffd86358e36
parent2d11f5b2ca863d4bd9e20b224932b247ed85842b
Fix mem leaks during auto-deinit

Certain functions are automatically called during auto-deinit in order
to deallocate resources. However, if we have never entered a function which
marks lib crypto as inited then they never get called. This can happen if
the user only ever makes use of a small sub-set of functions that don't hit
the auto-init code.

This commit ensures all such resources deallocated by these functions also
init libcrypto when they are initially allocated.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Ben Laurie <ben@openssl.org>
crypto/bio/b_addr.c
crypto/engine/eng_lib.c
crypto/err/err.c
crypto/ex_data.c
crypto/rand/md_rand.c