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
b1d29765
Commit
b1d29765
authored
Nov 02, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netio: Use CRT allocation functions.
parent
670d6391
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
netio.c
dlls/netio.sys/netio.c
+9
-11
No files found.
dlls/netio.sys/netio.c
View file @
b1d29765
...
...
@@ -31,8 +31,6 @@
#include "winsock2.h"
#include "ws2tcpip.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
netio
);
struct
_WSK_CLIENT
...
...
@@ -270,7 +268,7 @@ static NTSTATUS WINAPI wsk_close_socket(WSK_SOCKET *socket, IRP *irp)
unlock_socket
(
s
);
DeleteCriticalSection
(
&
s
->
cs_socket
);
heap_
free
(
socket
);
free
(
socket
);
irp
->
IoStatus
.
Information
=
0
;
dispatch_irp
(
irp
,
status
);
...
...
@@ -313,7 +311,7 @@ static void create_accept_socket(struct wsk_socket_internal *socket, struct wsk_
SOCKADDR
*
local_address
,
*
remote_address
;
struct
wsk_socket_internal
*
accept_socket
;
if
(
!
(
accept_socket
=
heap_alloc_zero
(
sizeof
(
*
accept_socket
))))
if
(
!
(
accept_socket
=
calloc
(
1
,
sizeof
(
*
accept_socket
))))
{
ERR
(
"No memory.
\n
"
);
dispatch_pending_io
(
io
,
STATUS_NO_MEMORY
,
0
);
...
...
@@ -761,7 +759,7 @@ static NTSTATUS WINAPI wsk_socket(WSK_CLIENT *client, ADDRESS_FAMILY address_fam
goto
done
;
}
if
(
!
(
socket
=
heap_alloc_zero
(
sizeof
(
*
socket
))))
if
(
!
(
socket
=
calloc
(
1
,
sizeof
(
*
socket
))))
{
status
=
STATUS_NO_MEMORY
;
closesocket
(
s
);
...
...
@@ -789,7 +787,7 @@ static NTSTATUS WINAPI wsk_socket(WSK_CLIENT *client, ADDRESS_FAMILY address_fam
default:
FIXME
(
"Flags %#lx not implemented.
\n
"
,
flags
);
closesocket
(
s
);
heap_
free
(
socket
);
free
(
socket
);
status
=
STATUS_NOT_IMPLEMENTED
;
goto
done
;
}
...
...
@@ -855,7 +853,7 @@ static void WINAPI get_address_info_callback(TP_CALLBACK_INSTANCE *instance, voi
context
->
irp
->
IoStatus
.
Information
=
0
;
dispatch_irp
(
context
->
irp
,
sock_error_to_ntstatus
(
ret
));
heap_
free
(
context
);
free
(
context
);
}
static
NTSTATUS
WINAPI
wsk_get_address_info
(
WSK_CLIENT
*
client
,
UNICODE_STRING
*
node_name
,
...
...
@@ -873,7 +871,7 @@ static NTSTATUS WINAPI wsk_get_address_info(WSK_CLIENT *client, UNICODE_STRING *
if
(
!
irp
)
return
STATUS_INVALID_PARAMETER
;
if
(
!
(
context
=
heap_
alloc
(
sizeof
(
*
context
))))
if
(
!
(
context
=
m
alloc
(
sizeof
(
*
context
))))
{
ERR
(
"No memory.
\n
"
);
status
=
STATUS_NO_MEMORY
;
...
...
@@ -894,7 +892,7 @@ static NTSTATUS WINAPI wsk_get_address_info(WSK_CLIENT *client, UNICODE_STRING *
ERR
(
"Could not submit thread pool callback.
\n
"
);
status
=
STATUS_UNSUCCESSFUL
;
dispatch_irp
(
irp
,
status
);
heap_
free
(
context
);
free
(
context
);
return
status
;
}
TRACE
(
"Submitted threadpool callback, context %p.
\n
"
,
context
);
...
...
@@ -959,7 +957,7 @@ NTSTATUS WINAPI WskRegister(WSK_CLIENT_NPI *wsk_client_npi, WSK_REGISTRATION *ws
TRACE
(
"wsk_client_npi %p, wsk_registration %p.
\n
"
,
wsk_client_npi
,
wsk_registration
);
if
(
!
(
client
=
heap_
alloc
(
sizeof
(
*
client
))))
if
(
!
(
client
=
m
alloc
(
sizeof
(
*
client
))))
{
ERR
(
"No memory.
\n
"
);
return
STATUS_NO_MEMORY
;
...
...
@@ -979,7 +977,7 @@ void WINAPI WskDeregister(WSK_REGISTRATION *wsk_registration)
{
TRACE
(
"wsk_registration %p.
\n
"
,
wsk_registration
);
heap_
free
(
wsk_registration
->
ReservedRegistrationContext
);
free
(
wsk_registration
->
ReservedRegistrationContext
);
}
static
void
WINAPI
driver_unload
(
DRIVER_OBJECT
*
driver
)
...
...
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