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
0502de41
Commit
0502de41
authored
Nov 15, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Don't allocate gobs of memory if there are no non-loopback interfaces.
parent
e1a83693
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ifenum.c
dlls/iphlpapi/ifenum.c
+4
-2
No files found.
dlls/iphlpapi/ifenum.c
View file @
0502de41
...
...
@@ -234,12 +234,14 @@ InterfaceIndexTable *getNonLoopbackInterfaceIndexTable(void)
if
(
indexes
)
{
struct
if_nameindex
*
p
;
DWORD
size
=
sizeof
(
InterfaceIndexTable
);
for
(
p
=
indexes
,
numInterfaces
=
0
;
p
&&
p
->
if_name
;
p
++
)
if
(
!
isLoopbackInterface
(
fd
,
p
->
if_name
))
numInterfaces
++
;
ret
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
InterfaceIndexTable
)
+
(
numInterfaces
-
1
)
*
sizeof
(
DWORD
));
if
(
numInterfaces
>
1
)
size
+=
(
numInterfaces
-
1
)
*
sizeof
(
DWORD
);
ret
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
if
(
ret
)
{
for
(
p
=
indexes
;
p
&&
p
->
if_name
;
p
++
)
if
(
!
isLoopbackInterface
(
fd
,
p
->
if_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