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
a45b16a4
Commit
a45b16a4
authored
May 18, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
May 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Fix a possible memory leak, cleanup a bit.
parent
c3a08421
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+14
-11
No files found.
dlls/rpcrt4/rpc_binding.c
View file @
a45b16a4
...
...
@@ -261,14 +261,15 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
RPCRT4_CreateConnection
(
&
NewConnection
,
Binding
->
server
,
Binding
->
Protseq
,
Binding
->
NetworkAddr
,
Binding
->
Endpoint
,
NULL
,
Binding
->
AuthInfo
,
Binding
);
*
Connection
=
NewConnection
;
status
=
RPCRT4_OpenConnection
(
NewConnection
);
if
(
status
!=
RPC_S_OK
)
{
if
(
status
!=
RPC_S_OK
)
{
RPCRT4_DestroyConnection
(
NewConnection
);
return
status
;
}
/* we need to send a binding packet if we are client. */
if
(
!
(
*
Connection
)
->
server
)
{
if
(
!
NewConnection
->
server
)
{
RpcPktHdr
*
hdr
;
RpcPktHdr
*
response_hdr
;
RPC_MESSAGE
msg
;
...
...
@@ -279,17 +280,17 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
RPC_MAX_PACKET_SIZE
,
RPC_MAX_PACKET_SIZE
,
InterfaceId
,
TransferSyntax
);
status
=
RPCRT4_Send
(
*
Connection
,
hdr
,
NULL
,
0
);
status
=
RPCRT4_Send
(
New
Connection
,
hdr
,
NULL
,
0
);
RPCRT4_FreeHeader
(
hdr
);
if
(
status
!=
RPC_S_OK
)
{
RPCRT4_DestroyConnection
(
*
Connection
);
RPCRT4_DestroyConnection
(
New
Connection
);
return
status
;
}
status
=
RPCRT4_Receive
(
NewConnection
,
&
response_hdr
,
&
msg
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"receive failed
\n
"
);
RPCRT4_DestroyConnection
(
*
Connection
);
RPCRT4_DestroyConnection
(
New
Connection
);
return
status
;
}
...
...
@@ -297,17 +298,19 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding, RpcConnection** Connection,
response_hdr
->
bind_ack
.
max_tsize
<
RPC_MIN_PACKET_SIZE
)
{
ERR
(
"failed to bind
\n
"
);
RPCRT4_FreeHeader
(
response_hdr
);
RPCRT4_DestroyConnection
(
*
Connection
);
RPCRT4_DestroyConnection
(
New
Connection
);
return
RPC_S_PROTOCOL_ERROR
;
}
/* FIXME: do more checks? */
(
*
Connection
)
->
MaxTransmissionSize
=
response_hdr
->
bind_ack
.
max_tsize
;
(
*
Connection
)
->
ActiveInterface
=
*
InterfaceId
;
NewConnection
->
MaxTransmissionSize
=
response_hdr
->
bind_ack
.
max_tsize
;
NewConnection
->
ActiveInterface
=
*
InterfaceId
;
RPCRT4_FreeHeader
(
response_hdr
);
}
Binding
->
FromConn
=
*
Connection
;
Binding
->
FromConn
=
NewConnection
;
*
Connection
=
NewConnection
;
return
RPC_S_OK
;
}
...
...
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