Clear ->next after creating nobject.
diff --git a/dlfcn.c b/dlfcn.c
index e8b7223..59e7fa6 100644
--- a/dlfcn.c
+++ b/dlfcn.c
@@ -75,6 +75,7 @@ static void global_add( HMODULE hModule )
return;
pobject->next = nobject;
+ nobject->next = NULL;
nobject->previous = pobject;
nobject->hModule = hModule;
}