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
a3d71559
Commit
a3d71559
authored
Jun 19, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Jun 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Free the correct buffer in the test.
parent
f1fae5ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
info.c
dlls/ntdll/tests/info.c
+5
-5
No files found.
dlls/ntdll/tests/info.c
View file @
a3d71559
...
...
@@ -243,20 +243,20 @@ static void test_query_process(void)
}
SYSTEM_PROCESS_INFORMATION_PRIVATE
,
*
PSYSTEM_PROCESS_INFORMATION_PRIVATE
;
ULONG
SystemInformationLength
=
sizeof
(
SYSTEM_PROCESS_INFORMATION_PRIVATE
);
SYSTEM_PROCESS_INFORMATION_PRIVATE
*
spi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
SystemInformationLength
);
SYSTEM_PROCESS_INFORMATION_PRIVATE
*
spi
,
*
spi_buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
SystemInformationLength
);
/* Only W2K3 returns the needed length, the rest returns 0, so we have to loop */
for
(;;)
{
status
=
pNtQuerySystemInformation
(
SystemProcessInformation
,
spi
,
SystemInformationLength
,
&
ReturnLength
);
status
=
pNtQuerySystemInformation
(
SystemProcessInformation
,
spi
_buf
,
SystemInformationLength
,
&
ReturnLength
);
if
(
status
!=
STATUS_INFO_LENGTH_MISMATCH
)
break
;
spi
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
spi
,
SystemInformationLength
*=
2
);
spi
_buf
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
spi_buf
,
SystemInformationLength
*=
2
);
}
ok
(
status
==
STATUS_SUCCESS
,
"Expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
spi
=
spi_buf
;
/* Get the first dwOffset, from this we can deduce the OS version we're running
*
...
...
@@ -320,7 +320,7 @@ static void test_query_process(void)
if
(
one_before_last_pid
==
0
)
one_before_last_pid
=
last_pid
;
HeapFree
(
GetProcessHeap
(),
0
,
spi
);
HeapFree
(
GetProcessHeap
(),
0
,
spi
_buf
);
}
static
void
test_query_procperf
(
void
)
...
...
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