Commit c5c48eb6 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed reference count handling to support LoadLibrary during a process

attach.
parent 3d8820ea
...@@ -1252,7 +1252,6 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags ) ...@@ -1252,7 +1252,6 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags )
} }
if (pwm) if (pwm)
{ {
if(!(pwm->flags & WINE_MODREF_MARKER))
pwm->refCount++; pwm->refCount++;
if ((pwm->flags & WINE_MODREF_DONT_RESOLVE_REFS) && if ((pwm->flags & WINE_MODREF_DONT_RESOLVE_REFS) &&
...@@ -1312,7 +1311,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags ) ...@@ -1312,7 +1311,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags )
TRACE_(loaddll)("Loaded module '%s' : %s\n", filename, filetype); TRACE_(loaddll)("Loaded module '%s' : %s\n", filename, filetype);
/* Set the refCount here so that an attach failure will */ /* Set the refCount here so that an attach failure will */
/* decrement the dependencies through the MODULE_FreeLibrary call. */ /* decrement the dependencies through the MODULE_FreeLibrary call. */
pwm->refCount++; pwm->refCount = 1;
if (allocated_libdir) if (allocated_libdir)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment