Rob Shearman : ole32: Always call IRpcChannelBuffer_GetBuffer in the class factory stub.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 27 05:49:20 CDT 2006


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Oct 26 12:38:09 2006 +0100

ole32: Always call IRpcChannelBuffer_GetBuffer in the class factory stub.

---

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

diff --git a/dlls/ole32/oleproxy.c b/dlls/ole32/oleproxy.c
index ad2960d..9a35b85 100644
--- a/dlls/ole32/oleproxy.c
+++ b/dlls/ole32/oleproxy.c
@@ -171,31 +171,31 @@ CFStub_Invoke(
 	}
 	hres = IClassFactory_CreateInstance(classfac,NULL,&iid,(LPVOID*)&ppv);
 	IClassFactory_Release(classfac);
+	msg->cbBuffer = 0;
 	if (hres) {
-	    msg->cbBuffer = 0;
 	    FIXME("Failed to create an instance of %s\n",debugstr_guid(&iid));
-	    return hres;
+	    goto getbuffer;
 	}
 	hres = CreateStreamOnHGlobal(0,TRUE,&pStm);
 	if (hres) {
 	    FIXME("Failed to create stream on hglobal\n");
-	    return hres;
+	    goto getbuffer;
 	}
 	hres = CoMarshalInterface(pStm,&iid,ppv,0,NULL,0);
 	IUnknown_Release((IUnknown*)ppv);
 	if (hres) {
-            FIXME("CoMarshalInterface failed, %x!\n",hres);
-	    msg->cbBuffer = 0;
-	    return hres;
+	    FIXME("CoMarshalInterface failed, %x!\n",hres);
+	    goto getbuffer;
 	}
 	hres = IStream_Stat(pStm,&ststg,0);
 	if (hres) {
 	    FIXME("Stat failed.\n");
-	    return hres;
+	    goto getbuffer;
 	}
 
 	msg->cbBuffer = ststg.cbSize.u.LowPart;
 
+getbuffer:
         IRpcChannelBuffer_GetBuffer(chanbuf, msg, &IID_IClassFactory);
         if (hres) return hres;
 




More information about the wine-cvs mailing list