[LOCALMON]
[reactos.git] / reactos / win32ss / printing / monitors / localmon / ports.c
index a56b5fd..ab146e3 100644 (file)
@@ -541,8 +541,8 @@ LocalmonClosePort(HANDLE hPort)
     {
         EnterCriticalSection(&pPort->pLocalmon->Section);
         RemoveEntryList(&pPort->Entry);
-        DllFreeSplMem(pPort);
         LeaveCriticalSection(&pPort->pLocalmon->Section);
+        DllFreeSplMem(pPort);
     }
 
     SetLastError(ERROR_SUCCESS);