Added some missing LeaveCriticalSection's.

diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c
index 4136070..ac7de30 100644
--- a/dlls/dplayx/dplobby.c
+++ b/dlls/dplayx/dplobby.c
@@ -1285,6 +1285,7 @@
     HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine );
     HeapFree( GetProcessHeap(), 0, enumData.lpszCurrentDirectory );
 
+    LeaveCriticalSection( &This->unk->DPL_lock );
     return DPERR_CANTCREATEPROCESS;
   }
 
@@ -1304,6 +1305,7 @@
   if( hr != DP_OK )
   {
     ERR( "SetConnectionSettings failure %s\n", DPLAYX_HresultToString( hr ) );
+    LeaveCriticalSection( &This->unk->DPL_lock );
     return hr;
   }
 
diff --git a/dlls/winedos/dosvm.c b/dlls/winedos/dosvm.c
index 3980c15..0947228 100644
--- a/dlls/winedos/dosvm.c
+++ b/dlls/winedos/dosvm.c
@@ -187,7 +187,6 @@
   LPDOSEVENT event, cur, prev;
 
   if (current_context) {
-    EnterCriticalSection(&qcrit);
     event = malloc(sizeof(DOSEVENT));
     if (!event) {
       ERR("out of memory allocating event entry\n");
@@ -196,6 +195,7 @@
     event->irq = irq; event->priority = priority;
     event->relay = relay; event->data = data;
 
+    EnterCriticalSection(&qcrit);
     /* insert event into linked list, in order *after*
      * all earlier events of higher or equal priority */
     cur = pending_event; prev = NULL;
diff --git a/dlls/winmm/mciavi/mciavi.c b/dlls/winmm/mciavi/mciavi.c
index 5c2e6b2..e2684d8 100644
--- a/dlls/winmm/mciavi/mciavi.c
+++ b/dlls/winmm/mciavi/mciavi.c
@@ -566,6 +566,7 @@
 	wma->dwCurrVideoFrame = MCIAVI_ConvertTimeFormatToFrame(wma, lpParms->dwTo);
     } else {
 	WARN("dwFlag doesn't tell where to seek to...\n");
+	LeaveCriticalSection(&wma->cs);
 	return MCIERR_MISSING_PARAMETER;
     }