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
0e6d5202
Commit
0e6d5202
authored
Jan 04, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Don't set Buffer to NULL in I_RpcFreeBuffer.
parent
1bb6c1b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
rpc_message.c
dlls/rpcrt4/rpc_message.c
+3
-7
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+0
-1
No files found.
dlls/rpcrt4/rpc_message.c
View file @
0e6d5202
...
...
@@ -917,12 +917,10 @@ fail:
RPC_STATUS
WINAPI
I_RpcGetBuffer
(
PRPC_MESSAGE
pMsg
)
{
TRACE
(
"(%p): BufferLength=%d
\n
"
,
pMsg
,
pMsg
->
BufferLength
);
/* FIXME: pfnAllocate? */
pMsg
->
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pMsg
->
BufferLength
);
TRACE
(
"Buffer=%p
\n
"
,
pMsg
->
Buffer
);
/* FIXME: which errors to return? */
return
pMsg
->
Buffer
?
S_OK
:
E_OUTOFMEMORY
;
return
pMsg
->
Buffer
?
RPC_S_OK
:
ERROR_OUTOFMEMORY
;
}
/***********************************************************************
...
...
@@ -934,7 +932,7 @@ static RPC_STATUS I_RpcReAllocateBuffer(PRPC_MESSAGE pMsg)
pMsg
->
Buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
pMsg
->
Buffer
,
pMsg
->
BufferLength
);
TRACE
(
"Buffer=%p
\n
"
,
pMsg
->
Buffer
);
return
pMsg
->
Buffer
?
RPC_S_OK
:
RPC_S_OUT_OF_RESOURCES
;
return
pMsg
->
Buffer
?
RPC_S_OK
:
ERROR_OUTOFMEMORY
;
}
/***********************************************************************
...
...
@@ -955,10 +953,8 @@ static RPC_STATUS I_RpcReAllocateBuffer(PRPC_MESSAGE pMsg)
RPC_STATUS
WINAPI
I_RpcFreeBuffer
(
PRPC_MESSAGE
pMsg
)
{
TRACE
(
"(%p) Buffer=%p
\n
"
,
pMsg
,
pMsg
->
Buffer
);
/* FIXME: pfnFree? */
HeapFree
(
GetProcessHeap
(),
0
,
pMsg
->
Buffer
);
pMsg
->
Buffer
=
NULL
;
return
S_OK
;
return
RPC_S_OK
;
}
/***********************************************************************
...
...
dlls/rpcrt4/tests/ndr_marshall.c
View file @
0e6d5202
...
...
@@ -1576,7 +1576,6 @@ todo_wine
StubMsg
.
BufferLength
=
1
;
NdrFreeBuffer
(
&
StubMsg
);
ok
(
RpcMessage
.
Handle
!=
NULL
,
"RpcMessage.Handle should not have been NULL
\n
"
);
todo_wine
ok
(
RpcMessage
.
Buffer
!=
NULL
,
"RpcMessage.Buffer should not have been NULL
\n
"
);
ok
(
RpcMessage
.
BufferLength
==
10
,
"RpcMessage.BufferLength should have been left as 10 instead of %d
\n
"
,
RpcMessage
.
BufferLength
);
ok
(
StubMsg
.
Buffer
!=
NULL
,
"Buffer should not have been NULL
\n
"
);
...
...
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