Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
efe606fd
Commit
efe606fd
authored
Nov 02, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Make sure to clean up properly on error.
- Restrict the critical section to getting the channel buffer and adding a reference to it.
parent
1acbdd9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
tmarshal.c
dlls/oleaut32/tmarshal.c
+17
-13
No files found.
dlls/oleaut32/tmarshal.c
View file @
efe606fd
...
...
@@ -1155,15 +1155,16 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
UINT
nrofnames
;
DWORD
remoteresult
=
0
;
ITypeInfo
*
tinfo
;
IRpcChannelBuffer
*
chanbuf
;
EnterCriticalSection
(
&
tpinfo
->
crit
);
hres
=
_get_funcdesc
(
tpinfo
->
tinfo
,
method
,
&
tinfo
,
&
fdesc
,
&
iname
,
&
fname
);
if
(
hres
)
{
ERR
(
"Did not find typeinfo/funcdesc entry for method %d!
\n
"
,
method
);
ERR
(
"Did not find typeinfo/funcdesc entry for method %d!
\n
"
,
method
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
E_FAIL
;
return
E_FAIL
;
}
if
(
!
tpinfo
->
chanbuf
)
...
...
@@ -1173,6 +1174,10 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
RPC_E_DISCONNECTED
;
}
chanbuf
=
tpinfo
->
chanbuf
;
IRpcChannelBuffer_AddRef
(
chanbuf
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
if
(
relaydeb
)
{
TRACE_
(
olerelay
)(
"->"
);
...
...
@@ -1234,19 +1239,17 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
memset
(
&
msg
,
0
,
sizeof
(
msg
));
msg
.
cbBuffer
=
buf
.
curoff
;
msg
.
iMethod
=
method
;
hres
=
IRpcChannelBuffer_GetBuffer
(
tpinfo
->
chanbuf
,
&
msg
,
&
(
tpinfo
->
iid
));
hres
=
IRpcChannelBuffer_GetBuffer
(
chanbuf
,
&
msg
,
&
(
tpinfo
->
iid
));
if
(
hres
)
{
ERR
(
"RpcChannelBuffer GetBuffer failed, %lx
\n
"
,
hres
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
hres
;
goto
exit
;
}
memcpy
(
msg
.
Buffer
,
buf
.
base
,
buf
.
curoff
);
if
(
relaydeb
)
TRACE_
(
olerelay
)(
"
\n
"
);
hres
=
IRpcChannelBuffer_SendReceive
(
tpinfo
->
chanbuf
,
&
msg
,
&
status
);
hres
=
IRpcChannelBuffer_SendReceive
(
chanbuf
,
&
msg
,
&
status
);
if
(
hres
)
{
ERR
(
"RpcChannelBuffer SendReceive failed, %lx
\n
"
,
hres
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
hres
;
goto
exit
;
}
if
(
relaydeb
)
TRACE_
(
olerelay
)(
" status = %08lx ("
,
status
);
...
...
@@ -1293,16 +1296,17 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */)
hres
=
xbuf_get
(
&
buf
,
(
LPBYTE
)
&
remoteresult
,
sizeof
(
DWORD
));
if
(
hres
!=
S_OK
)
return
hres
;
goto
exit
;
if
(
relaydeb
)
TRACE_
(
olerelay
)(
") = %08lx
\n
"
,
remoteresult
);
if
(
status
!=
S_OK
)
/* OLE/COM internal error */
return
status
;
hres
=
remoteresult
;
exit:
HeapFree
(
GetProcessHeap
(),
0
,
buf
.
base
);
IRpcChannelBuffer_Release
(
chanbuf
);
ITypeInfo_Release
(
tinfo
);
LeaveCriticalSection
(
&
tpinfo
->
crit
);
return
remoteresult
;
TRACE
(
"-- 0x%08lx
\n
"
,
hres
);
return
hres
;
}
HRESULT
WINAPI
ProxyIUnknown_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment