1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

global.c : fixed call to libssh2_crypto_exit #394 (#396)

* global.c : fixed call to libssh2_crypto_exit #394

File: global.c 

Notes: Don't call `libssh2_crypto_exit()` until `_libssh2_initialized` count is down to zero.

Credit: seba30
This commit is contained in:
Will Cosgrove
2019-07-31 13:29:29 -07:00
committed by GitHub
parent 92f76866a8
commit 0ceb477ff6

View File

@@ -62,7 +62,8 @@ libssh2_exit(void)
_libssh2_initialized--; _libssh2_initialized--;
if(!(_libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO)) { if(_libssh2_initialized == 0 &&
!(_libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO)) {
libssh2_crypto_exit(); libssh2_crypto_exit();
} }