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
a07cff77
Commit
a07cff77
authored
Jul 03, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use malloc() to allocate the object attributes buffer.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
72fc2cea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
18 deletions
+17
-18
file.c
dlls/ntdll/unix/file.c
+3
-3
process.c
dlls/ntdll/unix/process.c
+3
-3
sync.c
dlls/ntdll/unix/sync.c
+9
-10
thread.c
dlls/ntdll/unix/thread.c
+2
-2
No files found.
dlls/ntdll/unix/file.c
View file @
a07cff77
...
@@ -3596,7 +3596,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
...
@@ -3596,7 +3596,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
*
handle
=
wine_server_ptr_handle
(
reply
->
handle
);
*
handle
=
wine_server_ptr_handle
(
reply
->
handle
);
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
RtlFreeAnsiString
(
&
unix_name
);
RtlFreeAnsiString
(
&
unix_name
);
}
}
else
WARN
(
"%s not found (%x)
\n
"
,
debugstr_us
(
attr
->
ObjectName
),
io
->
u
.
Status
);
else
WARN
(
"%s not found (%x)
\n
"
,
debugstr_us
(
attr
->
ObjectName
),
io
->
u
.
Status
);
...
@@ -3671,7 +3671,7 @@ NTSTATUS WINAPI NtCreateMailslotFile( HANDLE *handle, ULONG access, OBJECT_ATTRI
...
@@ -3671,7 +3671,7 @@ NTSTATUS WINAPI NtCreateMailslotFile( HANDLE *handle, ULONG access, OBJECT_ATTRI
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
status
;
return
status
;
}
}
...
@@ -3719,7 +3719,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR
...
@@ -3719,7 +3719,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
status
;
return
status
;
}
}
...
...
dlls/ntdll/unix/process.c
View file @
a07cff77
...
@@ -836,7 +836,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
...
@@ -836,7 +836,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
if
(
socketpair
(
PF_UNIX
,
SOCK_STREAM
,
0
,
socketfd
)
==
-
1
)
if
(
socketpair
(
PF_UNIX
,
SOCK_STREAM
,
0
,
socketfd
)
==
-
1
)
{
{
status
=
STATUS_TOO_MANY_OPENED_FILES
;
status
=
STATUS_TOO_MANY_OPENED_FILES
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
goto
done
;
goto
done
;
}
}
#ifdef SO_PASSCRED
#ifdef SO_PASSCRED
...
@@ -873,7 +873,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
...
@@ -873,7 +873,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
process_info
=
wine_server_ptr_handle
(
reply
->
info
);
process_info
=
wine_server_ptr_handle
(
reply
->
info
);
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
if
(
status
)
if
(
status
)
{
{
...
@@ -906,7 +906,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
...
@@ -906,7 +906,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
}
}
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
if
(
status
)
goto
done
;
if
(
status
)
goto
done
;
/* create the child process */
/* create the child process */
...
...
dlls/ntdll/unix/sync.c
View file @
a07cff77
...
@@ -263,8 +263,7 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
...
@@ -263,8 +263,7 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
len
=
(
len
+
3
)
&
~
3
;
/* DWORD-align the entire structure */
len
=
(
len
+
3
)
&
~
3
;
/* DWORD-align the entire structure */
*
ret
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
if
(
!
(
*
ret
=
calloc
(
len
,
1
)))
return
STATUS_NO_MEMORY
;
if
(
!*
ret
)
return
STATUS_NO_MEMORY
;
(
*
ret
)
->
rootdir
=
wine_server_obj_handle
(
attr
->
RootDirectory
);
(
*
ret
)
->
rootdir
=
wine_server_obj_handle
(
attr
->
RootDirectory
);
(
*
ret
)
->
attributes
=
attr
->
Attributes
;
(
*
ret
)
->
attributes
=
attr
->
Attributes
;
...
@@ -341,7 +340,7 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
...
@@ -341,7 +340,7 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
ret
;
return
ret
;
}
}
...
@@ -448,7 +447,7 @@ NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_
...
@@ -448,7 +447,7 @@ NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
ret
;
return
ret
;
}
}
...
@@ -601,7 +600,7 @@ NTSTATUS WINAPI NtCreateMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT
...
@@ -601,7 +600,7 @@ NTSTATUS WINAPI NtCreateMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
ret
;
return
ret
;
}
}
...
@@ -702,7 +701,7 @@ NTSTATUS WINAPI NtCreateJobObject( HANDLE *handle, ACCESS_MASK access, const OBJ
...
@@ -702,7 +701,7 @@ NTSTATUS WINAPI NtCreateJobObject( HANDLE *handle, ACCESS_MASK access, const OBJ
*
handle
=
wine_server_ptr_handle
(
reply
->
handle
);
*
handle
=
wine_server_ptr_handle
(
reply
->
handle
);
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
ret
;
return
ret
;
}
}
...
@@ -937,7 +936,7 @@ NTSTATUS WINAPI NtCreateTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_
...
@@ -937,7 +936,7 @@ NTSTATUS WINAPI NtCreateTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
ret
;
return
ret
;
}
}
...
@@ -1280,7 +1279,7 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
...
@@ -1280,7 +1279,7 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
ret
;
return
ret
;
}
}
...
@@ -1370,7 +1369,7 @@ NTSTATUS WINAPI NtCreateIoCompletion( HANDLE *handle, ACCESS_MASK access, OBJECT
...
@@ -1370,7 +1369,7 @@ NTSTATUS WINAPI NtCreateIoCompletion( HANDLE *handle, ACCESS_MASK access, OBJECT
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
status
;
return
status
;
}
}
...
@@ -1583,7 +1582,7 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
...
@@ -1583,7 +1582,7 @@ NTSTATUS WINAPI NtCreateSection( HANDLE *handle, ACCESS_MASK access, const OBJEC
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
ret
;
return
ret
;
}
}
...
...
dlls/ntdll/unix/thread.c
View file @
a07cff77
...
@@ -193,7 +193,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
...
@@ -193,7 +193,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
if
(
server_pipe
(
request_pipe
)
==
-
1
)
if
(
server_pipe
(
request_pipe
)
==
-
1
)
{
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
return
STATUS_TOO_MANY_OPENED_FILES
;
return
STATUS_TOO_MANY_OPENED_FILES
;
}
}
server_send_fd
(
request_pipe
[
0
]
);
server_send_fd
(
request_pipe
[
0
]
);
...
@@ -216,7 +216,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
...
@@ -216,7 +216,7 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
RtlFreeHeap
(
GetProcessHeap
(),
0
,
objattr
);
free
(
objattr
);
if
(
status
)
if
(
status
)
{
{
close
(
request_pipe
[
1
]
);
close
(
request_pipe
[
1
]
);
...
...
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