[PATCH 0/1] MR8886: crypt32: Avoid syscall fault in process_detach() if GnuTLS failed to load.
This matches `gnutls_process_detach()` in `bcrypt`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8886
From: Brendan Shanks <bshanks(a)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)) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8886
secur32 could use the same treatment. Do you know why GnuTLS failed to load? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8886#note_114657
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8886
On Wed Sep 3 16:18:54 2025 +0000, Hans Leidekker wrote:
secur32 could use the same treatment. Do you know why GnuTLS failed to load? Ah true, I created !8896 for secur32. This is during the CrossOver build process, we're updating the prefix before the library rpaths have been fixed up so gnutls can't load libgmp and fails.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8886#note_114768
participants (3)
-
Brendan Shanks -
Brendan Shanks (@bshanks) -
Hans Leidekker (@hans)