$NetBSD$

--- loader/win32.c.orig	2005-11-19 15:35:45.000000000 +0100
+++ loader/win32.c	2005-11-23 17:08:42.000000000 +0100
@@ -451,8 +451,10 @@
 
     if (last_alloc)
 	pthread_mutex_unlock(&memmut);
-    else
+    else {
+	pthread_mutex_unlock(&memmut);
 	pthread_mutex_destroy(&memmut);
+    }
 
     //if (alccnt < 40000) printf("MY_RELEASE: %p\t%ld    (%d)\n", header, header->size, alccnt);
 #else
