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
9c63a30c
Commit
9c63a30c
authored
Oct 31, 2012
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Fix resources leaks.
parent
470ad72b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+6
-0
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
9c63a30c
...
@@ -1345,6 +1345,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
...
@@ -1345,6 +1345,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
if
(
getsockname
(
sock
,
(
struct
sockaddr
*
)
&
sa
,
&
sa_len
))
if
(
getsockname
(
sock
,
(
struct
sockaddr
*
)
&
sa
,
&
sa_len
))
{
{
WARN
(
"getsockname() failed: %s
\n
"
,
strerror
(
errno
));
WARN
(
"getsockname() failed: %s
\n
"
,
strerror
(
errno
));
closesocket
(
sock
);
status
=
RPC_S_CANT_CREATE_ENDPOINT
;
status
=
RPC_S_CANT_CREATE_ENDPOINT
;
continue
;
continue
;
}
}
...
@@ -1355,6 +1356,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
...
@@ -1355,6 +1356,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
if
(
ret
)
if
(
ret
)
{
{
WARN
(
"getnameinfo failed: %s
\n
"
,
gai_strerror
(
ret
));
WARN
(
"getnameinfo failed: %s
\n
"
,
gai_strerror
(
ret
));
closesocket
(
sock
);
status
=
RPC_S_CANT_CREATE_ENDPOINT
;
status
=
RPC_S_CANT_CREATE_ENDPOINT
;
continue
;
continue
;
}
}
...
@@ -2139,6 +2141,8 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
...
@@ -2139,6 +2141,8 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
password
);
HeapFree
(
GetProcessHeap
(),
0
,
password
);
HeapFree
(
GetProcessHeap
(),
0
,
user
);
HeapFree
(
GetProcessHeap
(),
0
,
user
);
HeapFree
(
GetProcessHeap
(),
0
,
proxy
);
HeapFree
(
GetProcessHeap
(),
0
,
servername
);
ERR
(
"InternetOpenW failed with error %d
\n
"
,
GetLastError
());
ERR
(
"InternetOpenW failed with error %d
\n
"
,
GetLastError
());
return
RPC_S_SERVER_UNAVAILABLE
;
return
RPC_S_SERVER_UNAVAILABLE
;
}
}
...
@@ -2153,6 +2157,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
...
@@ -2153,6 +2157,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
password
);
HeapFree
(
GetProcessHeap
(),
0
,
password
);
HeapFree
(
GetProcessHeap
(),
0
,
user
);
HeapFree
(
GetProcessHeap
(),
0
,
user
);
HeapFree
(
GetProcessHeap
(),
0
,
proxy
);
return
RPC_S_OUT_OF_RESOURCES
;
return
RPC_S_OUT_OF_RESOURCES
;
}
}
MultiByteToWideChar
(
CP_ACP
,
0
,
httpc
->
common
.
NetworkAddr
,
-
1
,
servername
,
strlen
(
httpc
->
common
.
NetworkAddr
)
+
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
httpc
->
common
.
NetworkAddr
,
-
1
,
servername
,
strlen
(
httpc
->
common
.
NetworkAddr
)
+
1
);
...
@@ -2163,6 +2168,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
...
@@ -2163,6 +2168,7 @@ static RPC_STATUS rpcrt4_http_internet_connect(RpcConnection_http *httpc)
HeapFree
(
GetProcessHeap
(),
0
,
password
);
HeapFree
(
GetProcessHeap
(),
0
,
password
);
HeapFree
(
GetProcessHeap
(),
0
,
user
);
HeapFree
(
GetProcessHeap
(),
0
,
user
);
HeapFree
(
GetProcessHeap
(),
0
,
proxy
);
HeapFree
(
GetProcessHeap
(),
0
,
servername
);
HeapFree
(
GetProcessHeap
(),
0
,
servername
);
if
(
!
httpc
->
session
)
if
(
!
httpc
->
session
)
...
...
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