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
3f9f4a4a
Commit
3f9f4a4a
authored
Sep 05, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipconfig: Use CRT allocation functions.
parent
dcb16021
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ipconfig.c
programs/ipconfig/ipconfig.c
+8
-8
No files found.
programs/ipconfig/ipconfig.c
View file @
3f9f4a4a
...
...
@@ -45,13 +45,13 @@ static int ipconfig_vprintfW(const WCHAR *msg, va_list va_args)
*/
len
=
WideCharToMultiByte
(
GetOEMCP
(),
0
,
msg_buffer
,
wlen
,
NULL
,
0
,
NULL
,
NULL
);
msgA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
msgA
=
malloc
(
len
);
if
(
!
msgA
)
return
0
;
WideCharToMultiByte
(
GetOEMCP
(),
0
,
msg_buffer
,
wlen
,
msgA
,
len
,
NULL
,
NULL
);
WriteFile
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
msgA
,
len
,
&
count
,
FALSE
);
HeapFree
(
GetProcessHeap
(),
0
,
msgA
);
free
(
msgA
);
}
return
count
;
...
...
@@ -146,7 +146,7 @@ static void print_basic_information(void)
if
(
GetAdaptersAddresses
(
AF_UNSPEC
,
GAA_FLAG_INCLUDE_GATEWAYS
,
NULL
,
NULL
,
&
out
)
==
ERROR_BUFFER_OVERFLOW
)
{
adapters
=
HeapAlloc
(
GetProcessHeap
(),
0
,
out
);
adapters
=
malloc
(
out
);
if
(
!
adapters
)
exit
(
1
);
...
...
@@ -194,7 +194,7 @@ static void print_basic_information(void)
}
}
HeapFree
(
GetProcessHeap
(),
0
,
adapters
);
free
(
adapters
);
}
}
...
...
@@ -265,7 +265,7 @@ static void print_full_information(void)
if
(
GetNetworkParams
(
NULL
,
&
out
)
==
ERROR_BUFFER_OVERFLOW
)
{
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
out
);
info
=
malloc
(
out
);
if
(
!
info
)
exit
(
1
);
...
...
@@ -288,13 +288,13 @@ static void print_full_information(void)
ipconfig_printfW
(
L"
\n
"
);
}
HeapFree
(
GetProcessHeap
(),
0
,
info
);
free
(
info
);
}
if
(
GetAdaptersAddresses
(
AF_UNSPEC
,
GAA_FLAG_INCLUDE_GATEWAYS
,
NULL
,
NULL
,
&
out
)
==
ERROR_BUFFER_OVERFLOW
)
{
adapters
=
HeapAlloc
(
GetProcessHeap
(),
0
,
out
);
adapters
=
malloc
(
out
);
if
(
!
adapters
)
exit
(
1
);
...
...
@@ -348,7 +348,7 @@ static void print_full_information(void)
}
}
HeapFree
(
GetProcessHeap
(),
0
,
adapters
);
free
(
adapters
);
}
}
...
...
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