Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2d56c3d6
Commit
2d56c3d6
authored
May 21, 2003
by
Ove Kaaven
Committed by
Alexandre Julliard
May 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For RPC servers, don't deallocate the RPC request packet before the
RPC reply packet is sent, in case marshalling the reply needs any of the request data.
parent
40c9882b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
rpc_message.c
dlls/rpcrt4/rpc_message.c
+10
-2
rpc_server.c
dlls/rpcrt4/rpc_server.c
+4
-1
No files found.
dlls/rpcrt4/rpc_message.c
View file @
2d56c3d6
...
...
@@ -46,11 +46,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
*/
RPC_STATUS
WINAPI
I_RpcGetBuffer
(
PRPC_MESSAGE
pMsg
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
pMsg
->
Handle
;
void
*
buf
;
TRACE
(
"(%p): BufferLength=%d
\n
"
,
pMsg
,
pMsg
->
BufferLength
);
/* FIXME: pfnAllocate? */
buf
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
pMsg
->
Buffer
,
pMsg
->
BufferLength
);
if
(
bind
->
server
)
{
/* it turns out that the original buffer data must still be available
* while the RPC server is marshalling a reply, so we should not deallocate
* it, we'll leave deallocating the original buffer to the RPC server */
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pMsg
->
BufferLength
);
}
else
{
buf
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
pMsg
->
Buffer
,
pMsg
->
BufferLength
);
}
TRACE
(
"Buffer=%p
\n
"
,
buf
);
if
(
buf
)
pMsg
->
Buffer
=
buf
;
/* FIXME: which errors to return? */
...
...
@@ -62,7 +70,7 @@ RPC_STATUS WINAPI I_RpcGetBuffer(PRPC_MESSAGE pMsg)
*/
RPC_STATUS
WINAPI
I_RpcFreeBuffer
(
PRPC_MESSAGE
pMsg
)
{
TRACE
(
"(%p)
\n
"
,
pMsg
);
TRACE
(
"(%p)
Buffer=%p
\n
"
,
pMsg
,
pMsg
->
Buffer
);
/* FIXME: pfnFree? */
HeapFree
(
GetProcessHeap
(),
0
,
pMsg
->
Buffer
);
pMsg
->
Buffer
=
NULL
;
...
...
dlls/rpcrt4/rpc_server.c
View file @
2d56c3d6
...
...
@@ -171,7 +171,10 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, void* buf
}
/* clean up */
HeapFree
(
GetProcessHeap
(),
0
,
msg
.
Buffer
);
if
(
msg
.
Buffer
==
buf
)
msg
.
Buffer
=
NULL
;
TRACE
(
"freeing Buffer=%p
\n
"
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
I_RpcFreeBuffer
(
&
msg
);
msg
.
Buffer
=
NULL
;
}
...
...
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