Francois Gouget : ole32: Fix a handle leak in local_server_thread().

Alexandre Julliard julliard at winehq.org
Wed Jul 13 12:16:32 CDT 2011


Module: wine
Branch: master
Commit: b6f28fc70fc2d75f3950e4cbe67521bdf0407d7e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b6f28fc70fc2d75f3950e4cbe67521bdf0407d7e

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Jul 13 00:08:25 2011 +0200

ole32: Fix a handle leak in local_server_thread().

---

 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;




More information about the wine-cvs mailing list