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
2324aeec
Commit
2324aeec
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: Use I_Rpc{Allocate, Free} instead of Heap{Alloc, Free} as that
the former are exported by rpcrt4 seemingly to allow callers of tower functions to free the allocated memory.
parent
7dab87e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+14
-14
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
2324aeec
...
...
@@ -181,14 +181,14 @@ static RPC_STATUS rpcrt4_ncalrpc_open(RpcConnection* Connection)
/* protseq=ncalrpc: supposed to use NT LPC ports,
* but we'll implement it with named pipes for now */
pname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
prefix
)
+
strlen
(
Connection
->
Endpoint
)
+
1
);
pname
=
I_RpcAllocate
(
strlen
(
prefix
)
+
strlen
(
Connection
->
Endpoint
)
+
1
);
strcat
(
strcpy
(
pname
,
prefix
),
Connection
->
Endpoint
);
if
(
Connection
->
server
)
r
=
rpcrt4_connect_pipe
(
Connection
,
pname
);
else
r
=
rpcrt4_open_pipe
(
Connection
,
pname
,
TRUE
);
HeapFree
(
GetProcessHeap
(),
0
,
pname
);
I_RpcFree
(
pname
);
return
r
;
}
...
...
@@ -205,13 +205,13 @@ static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection)
return
RPC_S_OK
;
/* protseq=ncacn_np: named pipes */
pname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
prefix
)
+
strlen
(
Connection
->
Endpoint
)
+
1
);
pname
=
I_RpcAllocate
(
strlen
(
prefix
)
+
strlen
(
Connection
->
Endpoint
)
+
1
);
strcat
(
strcpy
(
pname
,
prefix
),
Connection
->
Endpoint
);
if
(
Connection
->
server
)
r
=
rpcrt4_connect_pipe
(
Connection
,
pname
);
else
r
=
rpcrt4_open_pipe
(
Connection
,
pname
,
FALSE
);
HeapFree
(
GetProcessHeap
(),
0
,
pname
);
I_RpcFree
(
pname
);
return
r
;
}
...
...
@@ -339,7 +339,7 @@ static RPC_STATUS rpcrt4_ncacn_np_parse_top_of_tower(const unsigned char *tower_
if
(
endpoint
)
{
*
endpoint
=
HeapAlloc
(
GetProcessHeap
(),
0
,
smb_floor
->
count_rhs
);
*
endpoint
=
I_RpcAllocate
(
smb_floor
->
count_rhs
);
if
(
!*
endpoint
)
return
RPC_S_OUT_OF_RESOURCES
;
memcpy
(
*
endpoint
,
tower_data
,
smb_floor
->
count_rhs
);
...
...
@@ -362,12 +362,12 @@ static RPC_STATUS rpcrt4_ncacn_np_parse_top_of_tower(const unsigned char *tower_
if
(
networkaddr
)
{
*
networkaddr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nb_floor
->
count_rhs
);
*
networkaddr
=
I_RpcAllocate
(
nb_floor
->
count_rhs
);
if
(
!*
networkaddr
)
{
if
(
endpoint
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
endpoint
);
I_RpcFree
(
*
endpoint
);
*
endpoint
=
NULL
;
}
return
RPC_S_OUT_OF_RESOURCES
;
...
...
@@ -433,7 +433,7 @@ static RPC_STATUS rpcrt4_ncalrpc_parse_top_of_tower(const unsigned char *tower_d
if
(
endpoint
)
{
*
endpoint
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pipe_floor
->
count_rhs
);
*
endpoint
=
I_RpcAllocate
(
pipe_floor
->
count_rhs
);
if
(
!*
endpoint
)
return
RPC_S_OUT_OF_RESOURCES
;
memcpy
(
*
endpoint
,
tower_data
,
pipe_floor
->
count_rhs
);
...
...
@@ -673,7 +673,7 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_parse_top_of_tower(const unsigned char *to
if
(
endpoint
)
{
*
endpoint
=
HeapAlloc
(
GetProcessHeap
(),
0
,
6
);
*
endpoint
=
I_RpcAllocate
(
6
/* sizeof("65535") + 1 */
);
if
(
!*
endpoint
)
return
RPC_S_OUT_OF_RESOURCES
;
sprintf
(
*
endpoint
,
"%u"
,
ntohs
(
tcp_floor
->
port
));
...
...
@@ -681,12 +681,12 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_parse_top_of_tower(const unsigned char *to
if
(
networkaddr
)
{
*
networkaddr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
INET_ADDRSTRLEN
);
*
networkaddr
=
I_RpcAllocate
(
INET_ADDRSTRLEN
);
if
(
!*
networkaddr
)
{
if
(
endpoint
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
endpoint
);
I_RpcFree
(
*
endpoint
);
*
endpoint
=
NULL
;
}
return
RPC_S_OUT_OF_RESOURCES
;
...
...
@@ -695,11 +695,11 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_parse_top_of_tower(const unsigned char *to
if
(
!
inet_ntop
(
AF_INET
,
&
in_addr
,
*
networkaddr
,
INET_ADDRSTRLEN
))
{
ERR
(
"inet_ntop: %s
\n
"
,
strerror
(
errno
));
HeapFree
(
GetProcessHeap
(),
0
,
*
networkaddr
);
I_RpcFree
(
*
networkaddr
);
*
networkaddr
=
NULL
;
if
(
endpoint
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
endpoint
);
I_RpcFree
(
*
endpoint
);
*
endpoint
=
NULL
;
}
return
EPT_S_NOT_REGISTERED
;
...
...
@@ -949,7 +949,7 @@ RPC_STATUS RpcTransport_ParseTopOfTower(const unsigned char *tower_data,
if
((
status
==
RPC_S_OK
)
&&
protseq
)
{
*
protseq
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
protseq_ops
->
name
)
+
1
);
*
protseq
=
I_RpcAllocate
(
strlen
(
protseq_ops
->
name
)
+
1
);
strcpy
(
*
protseq
,
protseq_ops
->
name
);
}
...
...
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