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
e9951dbe
Commit
e9951dbe
authored
Jul 03, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use malloc() to allocate async I/O data.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a07cff77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
file.c
dlls/ntdll/unix/file.c
+9
-9
serial.c
dlls/ntdll/unix/serial.c
+4
-4
No files found.
dlls/ntdll/unix/file.c
View file @
e9951dbe
...
...
@@ -4489,11 +4489,11 @@ static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback,
while
(
io
)
{
struct
async_fileio
*
next
=
io
->
next
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
io
);
free
(
io
);
io
=
next
;
}
if
((
io
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
size
)))
if
((
io
=
malloc
(
size
)))
{
io
->
callback
=
callback
;
io
->
handle
=
handle
;
...
...
@@ -4676,7 +4676,7 @@ static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE a
}
SERVER_END_REQ
;
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
async
);
if
(
status
!=
STATUS_PENDING
)
free
(
async
);
if
(
wait_handle
)
status
=
wait_async
(
wait_handle
,
(
options
&
FILE_SYNCHRONOUS_IO_ALERT
),
io
);
return
status
;
...
...
@@ -4714,7 +4714,7 @@ static NTSTATUS server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE
}
SERVER_END_REQ
;
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
async
);
if
(
status
!=
STATUS_PENDING
)
free
(
async
);
if
(
wait_handle
)
status
=
wait_async
(
wait_handle
,
(
options
&
FILE_SYNCHRONOUS_IO_ALERT
),
io
);
return
status
;
...
...
@@ -4759,7 +4759,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
FIXME
(
"Unsupported ioctl %x (device=%x access=%x func=%x method=%x)
\n
"
,
code
,
code
>>
16
,
(
code
>>
14
)
&
3
,
(
code
>>
2
)
&
0xfff
,
code
&
3
);
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
async
);
if
(
status
!=
STATUS_PENDING
)
free
(
async
);
if
(
wait_handle
)
status
=
wait_async
(
wait_handle
,
(
options
&
FILE_SYNCHRONOUS_IO_ALERT
),
io
);
return
status
;
...
...
@@ -4922,7 +4922,7 @@ static NTSTATUS register_async_file_read( HANDLE handle, HANDLE event,
}
SERVER_END_REQ
;
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
fileio
);
if
(
status
!=
STATUS_PENDING
)
free
(
fileio
);
return
status
;
}
...
...
@@ -5388,7 +5388,7 @@ NTSTATUS WINAPI NtWriteFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, v
}
SERVER_END_REQ
;
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
fileio
);
if
(
status
!=
STATUS_PENDING
)
free
(
fileio
);
goto
err
;
}
else
/* synchronous write, wait for the fd to become ready */
...
...
@@ -5752,7 +5752,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE handle, IO_STATUS_BLOCK *io )
}
SERVER_END_REQ
;
if
(
ret
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
async
);
if
(
ret
!=
STATUS_PENDING
)
free
(
async
);
if
(
wait_handle
)
ret
=
wait_async
(
wait_handle
,
FALSE
,
io
);
}
...
...
@@ -5883,7 +5883,7 @@ NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_AP
}
SERVER_END_REQ
;
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
fileio
);
if
(
status
!=
STATUS_PENDING
)
free
(
fileio
);
return
status
;
}
...
...
dlls/ntdll/unix/serial.c
View file @
e9951dbe
...
...
@@ -1007,7 +1007,7 @@ static DWORD CALLBACK wait_for_event(LPVOID arg)
}
stop_waiting
(
commio
->
hDevice
);
if
(
commio
->
hEvent
)
NtSetEvent
(
commio
->
hEvent
,
NULL
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
commio
);
free
(
commio
);
return
0
;
}
...
...
@@ -1019,7 +1019,7 @@ static NTSTATUS wait_on(HANDLE hDevice, int fd, HANDLE hEvent, PIO_STATUS_BLOCK
if
((
status
=
NtResetEvent
(
hEvent
,
NULL
)))
return
status
;
commio
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
async_commio
)
);
commio
=
malloc
(
sizeof
(
async_commio
)
);
if
(
!
commio
)
return
STATUS_NO_MEMORY
;
commio
->
hDevice
=
hDevice
;
...
...
@@ -1030,7 +1030,7 @@ static NTSTATUS wait_on(HANDLE hDevice, int fd, HANDLE hEvent, PIO_STATUS_BLOCK
status
=
get_wait_mask
(
commio
->
hDevice
,
&
commio
->
evtmask
,
&
commio
->
cookie
,
(
commio
->
evtmask
&
EV_TXEMPTY
)
?
&
commio
->
pending_write
:
NULL
,
TRUE
);
if
(
status
)
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
commio
);
free
(
commio
);
return
status
;
}
...
...
@@ -1098,7 +1098,7 @@ error_caps:
#endif
out_now:
stop_waiting
(
commio
->
hDevice
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
commio
);
free
(
commio
);
return
status
;
}
...
...
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