From: Brendan Shanks bshanks@codeweavers.com
--- dlls/crypt32/unixlib.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c index 5a255442fdf..82064b29a76 100644 --- a/dlls/crypt32/unixlib.c +++ b/dlls/crypt32/unixlib.c @@ -146,9 +146,12 @@ fail:
static NTSTATUS process_detach( void *args ) { - pgnutls_global_deinit(); - dlclose( libgnutls_handle ); - libgnutls_handle = NULL; + if (libgnutls_handle) + { + pgnutls_global_deinit(); + dlclose( libgnutls_handle ); + libgnutls_handle = NULL; + } return STATUS_SUCCESS; } #define RSA_MAGIC_KEY ('R' | ('S' << 8) | ('A' << 16) | ('2' << 24))