ole32: Fix a handle leak in local_server_thread().

Francois Gouget fgouget at codeweavers.com
Tue Jul 12 17:08:25 CDT 2011


---
 dlls/ole32/rpc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index 431f5bc..7801d9f 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -1936,7 +1936,12 @@ static DWORD WINAPI local_server_thread(LPVOID param)
         TRACE("marshalling IClassFactory to client\n");
         
         hres = IStream_Stat(pStm,&ststg,STATFLAG_NONAME);
-        if (hres) return hres;
+        if (hres)
+        {
+            CloseHandle(hPipe);
+            CloseHandle(pipe_event);
+            return hres;
+        }
 
         seekto.u.LowPart = 0;
         seekto.u.HighPart = 0;
-- 
1.7.5.4




More information about the wine-patches mailing list