with libssh linked as static lib leads to access violation.
See https://curl.haxx.se/libcurl/c/opensslthreadlock.html. Seems calling
is missing in crypto_thread_finalize() of file libcrypto.c
So on second ssh_init() call probably still the old libcrypto_lock_callback pointer is stored and called by openssl before CRYPTO_set_locking_callback() is newly set.