diff options
author | George Hazan <george.hazan@gmail.com> | 2023-06-09 21:40:16 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-06-09 21:40:16 +0300 |
commit | 927f00cc19b7239a1fe12abe30b472d61b753d8d (patch) | |
tree | 68a190dd83dc2dcceb82464a1953f2701af2a109 /libs/libssh2/src/global.c | |
parent | 1b241cad53b8c3c5300409fe681de18e636dcf3d (diff) |
fixes #3551 (Update libssh2 to 1.11.0)
Diffstat (limited to 'libs/libssh2/src/global.c')
-rw-r--r-- | libs/libssh2/src/global.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/libssh2/src/global.c b/libs/libssh2/src/global.c index f88eb33da3..a8bc38078f 100644 --- a/libs/libssh2/src/global.c +++ b/libs/libssh2/src/global.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2010 Lars Nordin <Lars.Nordin@SDlabs.se> - * Copyright (C) 2010 Simon Josefsson <simon@josefsson.org> +/* Copyright (C) Lars Nordin <Lars.Nordin@SDlabs.se> + * Copyright (C) Simon Josefsson <simon@josefsson.org> * All rights reserved. * * Redistribution and use in source and binary forms, @@ -34,6 +34,8 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. + * + * SPDX-License-Identifier: BSD-3-Clause */ #include "libssh2_priv.h" @@ -62,7 +64,8 @@ libssh2_exit(void) _libssh2_initialized--; - if(!(_libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO)) { + if(_libssh2_initialized == 0 && + !(_libssh2_init_flags & LIBSSH2_INIT_NO_CRYPTO)) { libssh2_crypto_exit(); } @@ -73,5 +76,5 @@ void _libssh2_init_if_needed(void) { if(_libssh2_initialized == 0) - (void)libssh2_init (0); + (void)libssh2_init(0); } |