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
0138da50
Commit
0138da50
authored
May 27, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Reuse IRP input buffer if it wasn't used.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6870bb74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+3
-6
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
0138da50
...
...
@@ -633,7 +633,6 @@ static NTSTATUS dispatch_create( struct dispatch_context *context )
irp
->
Flags
|=
IRP_CREATE_OPERATION
;
dispatch_irp
(
device
,
irp
,
context
);
HeapFree
(
GetProcessHeap
(),
0
,
context
->
in_buff
);
return
STATUS_SUCCESS
;
}
...
...
@@ -671,7 +670,6 @@ static NTSTATUS dispatch_close( struct dispatch_context *context )
irp
->
Flags
|=
IRP_CLOSE_OPERATION
;
dispatch_irp
(
device
,
irp
,
context
);
HeapFree
(
GetProcessHeap
(),
0
,
context
->
in_buff
);
return
STATUS_SUCCESS
;
}
...
...
@@ -714,7 +712,6 @@ static NTSTATUS dispatch_read( struct dispatch_context *context )
irp
->
Flags
|=
IRP_DEALLOCATE_BUFFER
;
/* deallocate out_buff */
dispatch_irp
(
device
,
irp
,
context
);
HeapFree
(
GetProcessHeap
(),
0
,
context
->
in_buff
);
return
STATUS_SUCCESS
;
}
...
...
@@ -738,6 +735,7 @@ static NTSTATUS dispatch_write( struct dispatch_context *context )
if
(
!
(
irp
=
IoBuildSynchronousFsdRequest
(
IRP_MJ_WRITE
,
device
,
context
->
in_buff
,
context
->
in_size
,
&
offset
,
NULL
,
NULL
)))
return
STATUS_NO_MEMORY
;
context
->
in_buff
=
NULL
;
irp
->
Tail
.
Overlay
.
OriginalFileObject
=
file
;
irp
->
RequestorMode
=
UserMode
;
...
...
@@ -779,7 +777,6 @@ static NTSTATUS dispatch_flush( struct dispatch_context *context )
dispatch_irp
(
device
,
irp
,
context
);
HeapFree
(
GetProcessHeap
(),
0
,
context
->
in_buff
);
return
STATUS_SUCCESS
;
}
...
...
@@ -841,6 +838,7 @@ static NTSTATUS dispatch_ioctl( struct dispatch_context *context )
irp
->
Tail
.
Overlay
.
OriginalFileObject
=
file
;
irp
->
RequestorMode
=
UserMode
;
irp
->
AssociatedIrp
.
SystemBuffer
=
context
->
in_buff
;
context
->
in_buff
=
NULL
;
irp
->
Flags
|=
IRP_DEALLOCATE_BUFFER
;
/* deallocate in_buff */
dispatch_irp
(
device
,
irp
,
context
);
...
...
@@ -981,8 +979,7 @@ NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event )
if
(
status
==
STATUS_SUCCESS
)
{
context
.
handle
=
0
;
/* status reported by IoCompleteRequest */
context
.
in_size
=
4096
;
context
.
in_buff
=
NULL
;
if
(
!
context
.
in_buff
)
context
.
in_size
=
4096
;
}
break
;
case
STATUS_BUFFER_OVERFLOW
:
...
...
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