[DPLAYX] fix bug 872

Robert Shearman rob at codeweavers.com
Tue Mar 8 15:38:16 CST 2005


Raphael wrote:

>+  *lphStart = CreateEventW( &s_attrib, TRUE, FALSE, NULL );
>+  *lphDeath = CreateEventW( &s_attrib, TRUE, FALSE, NULL );
>+  *lphRead  = CreateEventW( &s_attrib, TRUE, FALSE, NULL );
> 
>   if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart,
>                           hDestProcess, &hAppStart,
>@@ -1185,6 +1181,13 @@
>     )
>   {
>     /* FIXME: Handle leak... */
>+    if (INVALID_HANDLE_VALUE != *lphStart) { CloseHandle(*lphStart); *lphStart = INVALID_HANDLE_VALUE; }
>+    if (INVALID_HANDLE_VALUE != *lphDeath) { CloseHandle(*lphDeath); *lphDeath = INVALID_HANDLE_VALUE; }
>+    if (INVALID_HANDLE_VALUE != *lphRead)  { CloseHandle(*lphRead);  *lphRead  = INVALID_HANDLE_VALUE; }
>+    if (INVALID_HANDLE_VALUE != hAppStart) CloseHandle(hAppStart);
>+    if (INVALID_HANDLE_VALUE != hAppDeath) CloseHandle(hAppDeath);
>+    if (INVALID_HANDLE_VALUE != hAppRead)  CloseHandle(hAppRead);
>+
>  
>

You can't close handles from another process.

>     ERR( "Unable to dup handles\n" );
>     return FALSE;
>   }
>  
>

Rob



More information about the wine-devel mailing list