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
fcc2fe18
Commit
fcc2fe18
authored
Feb 11, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid double checking free type flags in NtFreeVirtualMemory.
parent
8611e654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
virtual.c
dlls/ntdll/virtual.c
+8
-9
No files found.
dlls/ntdll/virtual.c
View file @
fcc2fe18
...
...
@@ -1129,20 +1129,14 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, ULONG *siz
return
STATUS_SUCCESS
;
}
if
((
type
!=
MEM_DECOMMIT
)
&&
(
type
!=
MEM_RELEASE
))
{
WARN
(
"called with wrong free type flags (%08lx) !
\n
"
,
type
);
return
STATUS_INVALID_PARAMETER
;
}
/* Free the pages */
if
(
type
==
MEM_RELEASE
)
{
/* Free the pages */
if
(
size
||
(
base
!=
view
->
base
))
return
STATUS_INVALID_PARAMETER
;
VIRTUAL_DeleteView
(
view
);
}
else
else
if
(
type
==
MEM_DECOMMIT
)
{
/* Decommit the pages by remapping zero-pages instead */
...
...
@@ -1150,6 +1144,11 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, ULONG *siz
ERR
(
"Could not remap pages, expect trouble
\n
"
);
if
(
!
VIRTUAL_SetProt
(
view
,
base
,
size
,
0
))
return
STATUS_ACCESS_DENIED
;
/* FIXME */
}
else
{
WARN
(
"called with wrong free type flags (%08lx) !
\n
"
,
type
);
return
STATUS_INVALID_PARAMETER
;
}
*
addr_ptr
=
base
;
*
size_ptr
=
size
;
...
...
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