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
2a1dc157
Commit
2a1dc157
authored
Dec 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix the libdl refcount when loading the same builtin twice.
parent
1d6db94e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
module.c
dlls/kernel32/tests/module.c
+1
-1
loader.c
dlls/ntdll/loader.c
+6
-1
No files found.
dlls/kernel32/tests/module.c
View file @
2a1dc157
...
...
@@ -179,7 +179,7 @@ static void testNestedLoadLibraryA(void)
/* Try to load the dll again, if refcounting is ok, this should work */
hModule1
=
LoadLibraryA
(
path1
);
todo_wine
ok
(
hModule1
!=
NULL
,
"LoadLibrary(%s) failed
\n
"
,
path1
);
ok
(
hModule1
!=
NULL
,
"LoadLibrary(%s) failed
\n
"
,
path1
);
if
(
hModule1
!=
NULL
)
ok
(
FreeLibrary
(
hModule1
),
"FreeLibrary() failed
\n
"
);
}
...
...
dlls/ntdll/loader.c
View file @
2a1dc157
...
...
@@ -1553,7 +1553,11 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, LPCWSTR path, HANDLE file,
}
}
if
(
info
.
status
!=
STATUS_SUCCESS
)
return
info
.
status
;
if
(
info
.
status
!=
STATUS_SUCCESS
)
{
wine_dll_unload
(
handle
);
return
info
.
status
;
}
if
(
!
info
.
wm
)
{
...
...
@@ -1574,6 +1578,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, LPCWSTR path, HANDLE file,
break
;
}
}
wine_dll_unload
(
handle
);
/* release the libdl refcount */
if
(
!
info
.
wm
)
return
STATUS_INVALID_IMAGE_FORMAT
;
if
(
info
.
wm
->
ldr
.
LoadCount
!=
-
1
)
info
.
wm
->
ldr
.
LoadCount
++
;
}
...
...
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