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
b9423076
Commit
b9423076
authored
Oct 03, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Don't use HEAP_ZERO_MEMORY when most of the fields will be initialised to non-zero values.
parent
64886ebc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+15
-3
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
b9423076
...
...
@@ -90,7 +90,14 @@ typedef struct _RpcConnection_np
static
RpcConnection
*
rpcrt4_conn_np_alloc
(
void
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
RpcConnection_np
));
RpcConnection_np
*
npc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RpcConnection_np
));
if
(
npc
)
{
npc
->
pipe
=
NULL
;
npc
->
thread
=
NULL
;
memset
(
&
npc
->
ovl
,
0
,
sizeof
(
npc
->
ovl
));
}
return
&
npc
->
common
;
}
static
RPC_STATUS
rpcrt4_connect_pipe
(
RpcConnection
*
Connection
,
LPCSTR
pname
)
...
...
@@ -446,8 +453,9 @@ typedef struct _RpcConnection_tcp
static
RpcConnection
*
rpcrt4_conn_tcp_alloc
(
void
)
{
RpcConnection_tcp
*
tcpc
;
tcpc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
RpcConnection_tcp
));
tcpc
->
sock
=
-
1
;
tcpc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RpcConnection_tcp
));
if
(
tcpc
)
tcpc
->
sock
=
-
1
;
return
&
tcpc
->
common
;
}
...
...
@@ -779,13 +787,17 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server,
return
RPC_S_PROTSEQ_NOT_SUPPORTED
;
NewConnection
=
ops
->
alloc
();
NewConnection
->
Next
=
NULL
;
NewConnection
->
server
=
server
;
NewConnection
->
ops
=
ops
;
NewConnection
->
NetworkAddr
=
RPCRT4_strdupA
(
NetworkAddr
);
NewConnection
->
Endpoint
=
RPCRT4_strdupA
(
Endpoint
);
NewConnection
->
Used
=
Binding
;
NewConnection
->
MaxTransmissionSize
=
RPC_MAX_PACKET_SIZE
;
memset
(
&
NewConnection
->
ActiveInterface
,
0
,
sizeof
(
NewConnection
->
ActiveInterface
));
NewConnection
->
NextCallId
=
1
;
memset
(
&
NewConnection
->
ctx
,
0
,
sizeof
(
NewConnection
->
ctx
));
if
(
AuthInfo
)
RpcAuthInfo_AddRef
(
AuthInfo
);
NewConnection
->
AuthInfo
=
AuthInfo
;
list_init
(
&
NewConnection
->
conn_pool_entry
);
...
...
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