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
e358731f
Commit
e358731f
authored
Apr 04, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Remove unnecessary handler from LocalLock.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2fcb072f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
memory.c
dlls/kernelbase/memory.c
+10
-17
No files found.
dlls/kernelbase/memory.c
View file @
e358731f
...
@@ -774,6 +774,7 @@ HLOCAL WINAPI DECLSPEC_HOTPATCH LocalFree( HLOCAL handle )
...
@@ -774,6 +774,7 @@ HLOCAL WINAPI DECLSPEC_HOTPATCH LocalFree( HLOCAL handle )
*/
*/
LPVOID
WINAPI
DECLSPEC_HOTPATCH
LocalLock
(
HLOCAL
handle
)
LPVOID
WINAPI
DECLSPEC_HOTPATCH
LocalLock
(
HLOCAL
handle
)
{
{
HANDLE
heap
=
GetProcessHeap
();
struct
mem_entry
*
mem
;
struct
mem_entry
*
mem
;
void
*
ret
=
NULL
;
void
*
ret
=
NULL
;
...
@@ -794,28 +795,20 @@ LPVOID WINAPI DECLSPEC_HOTPATCH LocalLock( HLOCAL handle )
...
@@ -794,28 +795,20 @@ LPVOID WINAPI DECLSPEC_HOTPATCH LocalLock( HLOCAL handle )
return
ret
;
return
ret
;
}
}
RtlLockHeap
(
GetProcessHeap
()
);
RtlLockHeap
(
heap
);
__TRY
if
((
mem
=
unsafe_mem_from_HLOCAL
(
handle
)))
{
{
if
((
mem
=
unsafe_mem_from_HLOCAL
(
handle
)))
ret
=
mem
->
ptr
;
{
if
(
!
mem
->
ptr
)
SetLastError
(
ERROR_DISCARDED
);
ret
=
mem
->
ptr
;
else
if
(
mem
->
lock
<
LMEM_LOCKCOUNT
)
mem
->
lock
++
;
if
(
!
mem
->
ptr
)
SetLastError
(
ERROR_DISCARDED
);
else
if
(
mem
->
lock
<
LMEM_LOCKCOUNT
)
mem
->
lock
++
;
}
else
{
WARN_
(
globalmem
)(
"invalid handle %p
\n
"
,
handle
);
SetLastError
(
ERROR_INVALID_HANDLE
);
}
}
}
__EXCEPT_PAGE_FAULT
else
{
{
WARN_
(
globalmem
)(
"
(%p): Page fault occurred ! Caused by bug ?
\n
"
,
handle
);
WARN_
(
globalmem
)(
"
invalid handle %p
\n
"
,
handle
);
SetLastError
(
ERROR_INVALID_HANDLE
);
SetLastError
(
ERROR_INVALID_HANDLE
);
}
}
__ENDTRY
RtlUnlockHeap
(
heap
);
RtlUnlockHeap
(
GetProcessHeap
()
);
return
ret
;
return
ret
;
}
}
...
...
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