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 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:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user