Fix to rpcrt4

Alberto Massari alby at exln.com
Thu Nov 7 04:44:39 CST 2002


Changelog:
- Avoid crashing when releasing an NdrCStdStubBuffer that had been 
previously disconnected.

Alberto

Index: cstub.c
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/cstub.c,v
retrieving revision 1.1
diff -u -r1.1 cstub.c
--- cstub.c	10 Oct 2002 22:46:08 -0000	1.1
+++ cstub.c	7 Nov 2002 10:39:04 -0000
@@ -95,8 +95,10 @@
    TRACE("(%p)->Release()\n",This);

    if (!--(This->RefCount)) {
-    IUnknown_Release(This->pvServerObject);
-    IPSFactoryBuffer_Release(This->pPSFactory);
+    if(This->pvServerObject)
+        IUnknown_Release(This->pvServerObject);
+    if(This->pPSFactory)
+        IPSFactoryBuffer_Release(This->pPSFactory);
      HeapFree(GetProcessHeap(),0,This);
      return 0;
    }





More information about the wine-patches mailing list