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
916c5f2e
Commit
916c5f2e
authored
Feb 26, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Use kernel object allocators for file object.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7fb89b12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+5
-4
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
916c5f2e
...
...
@@ -293,6 +293,7 @@ static const WCHAR file_type_name[] = {'F','i','l','e',0};
static
struct
_OBJECT_TYPE
file_type
=
{
file_type_name
,
free_kernel_object
};
POBJECT_TYPE
IoFileObjectType
=
&
file_type
;
...
...
@@ -324,7 +325,7 @@ static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp,
if
(
irp
->
Flags
&
IRP_CLOSE_OPERATION
)
{
HeapFree
(
GetProcessHeap
(),
0
,
file
);
dereference_kernel_object
(
file
);
irp
->
Tail
.
Overlay
.
OriginalFileObject
=
NULL
;
}
...
...
@@ -357,7 +358,7 @@ static NTSTATUS dispatch_create( const irp_params_t *params, void *in_buff, ULON
FILE_OBJECT
*
file
;
DEVICE_OBJECT
*
device
=
wine_server_get_ptr
(
params
->
create
.
device
);
if
(
!
(
file
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
file
)
)))
return
STATUS_NO_MEMORY
;
if
(
!
(
file
=
alloc_kernel_object
(
IoFileObjectType
,
sizeof
(
*
file
),
1
)))
return
STATUS_NO_MEMORY
;
TRACE
(
"device %p -> file %p
\n
"
,
device
,
file
);
...
...
@@ -367,7 +368,7 @@ static NTSTATUS dispatch_create( const irp_params_t *params, void *in_buff, ULON
if
(
!
(
irp
=
IoAllocateIrp
(
device
->
StackSize
,
FALSE
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
file
);
dereference_kernel_object
(
file
);
return
STATUS_NO_MEMORY
;
}
...
...
@@ -412,7 +413,7 @@ static NTSTATUS dispatch_close( const irp_params_t *params, void *in_buff, ULONG
if
(
!
(
irp
=
IoAllocateIrp
(
device
->
StackSize
,
FALSE
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
file
);
dereference_kernel_object
(
file
);
return
STATUS_NO_MEMORY
;
}
...
...
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