SMATCH: add missing LeaveCriticalSection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

on some error path the critical section wasn't released.
Found with smatch's help.

License: LGPL, X11
Changelog:
	Michael Stefaniuc <mstefani@redhat.com>
	- add some missing LeaveCriticalSection's

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
Index: dlls/dplayx/dplobby.c
===================================================================
RCS file: /home/wine/wine/dlls/dplayx/dplobby.c,v
retrieving revision 1.24
diff -u -r1.24 dplobby.c
--- dlls/dplayx/dplobby.c	7 Jan 2003 20:36:29 -0000	1.24
+++ dlls/dplayx/dplobby.c	9 Feb 2003 23:02:16 -0000
@@ -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;
   }
 
Index: dlls/winedos/dosvm.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/dosvm.c,v
retrieving revision 1.32
diff -u -r1.32 dosvm.c
--- dlls/winedos/dosvm.c	12 Dec 2002 23:34:02 -0000	1.32
+++ dlls/winedos/dosvm.c	9 Feb 2003 23:02:18 -0000
@@ -191,6 +191,7 @@
     event = malloc(sizeof(DOSEVENT));
     if (!event) {
       ERR("out of memory allocating event entry\n");
+      LeaveCriticalSection(&qcrit);
       return;
     }
     event->irq = irq; event->priority = priority;
Index: dlls/winmm/mciavi/mciavi.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mciavi/mciavi.c,v
retrieving revision 1.15
diff -u -r1.15 mciavi.c
--- dlls/winmm/mciavi/mciavi.c	4 Nov 2002 23:53:43 -0000	1.15
+++ dlls/winmm/mciavi/mciavi.c	9 Feb 2003 23:02:18 -0000
@@ -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;
     }
 

Attachment: pgp00104.pgp
Description: PGP signature


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux