]> granicus.if.org Git - p11-kit/commitdiff
Fix problems crashing when freeing TLS on windows
authorStef Walter <stefw@collabora.co.uk>
Sat, 29 Oct 2011 08:29:23 +0000 (01:29 -0700)
committerStef Walter <stefw@collabora.co.uk>
Sat, 29 Oct 2011 08:29:23 +0000 (01:29 -0700)
p11-kit/util.c

index c7f6138c8ff86cd6a55474280de9ed8a2b3e15ce..c04b6360cc0877ec944c8a5b7bb6dfeff9a9128f 100644 (file)
@@ -319,6 +319,8 @@ static void
 free_tls_value (LPVOID data)
 {
        p11_local *local = data;
+       if (local == NULL)
+               return;
        if (local->last_error)
                LocalFree (local->last_error);
        LocalFree (data);