ssl: clear the OpenSSL locking function

We're freeing the memory which holds the locks so we must make sure that
the locking function doesn't try to use it.
Plug possible leak in the openssl locks