ntdll: Avoid activation context leak for dlls with no imports.
This commit is contained in:
parent
f9c9f23763
commit
4e4c150bed
|
@ -625,8 +625,6 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
|
|||
|
||||
if (!(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) return STATUS_SUCCESS; /* already done */
|
||||
wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS;
|
||||
if (!create_module_activation_context( &wm->ldr ))
|
||||
RtlActivateActivationContext( 0, wm->ldr.ActivationContext, &cookie );
|
||||
|
||||
if (!(imports = RtlImageDirectoryEntryToData( wm->ldr.BaseAddress, TRUE,
|
||||
IMAGE_DIRECTORY_ENTRY_IMPORT, &size )))
|
||||
|
@ -637,6 +635,9 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path )
|
|||
|
||||
if (!nb_imports) return STATUS_SUCCESS; /* no imports */
|
||||
|
||||
if (!create_module_activation_context( &wm->ldr ))
|
||||
RtlActivateActivationContext( 0, wm->ldr.ActivationContext, &cookie );
|
||||
|
||||
/* Allocate module dependency list */
|
||||
wm->nDeps = nb_imports;
|
||||
wm->deps = RtlAllocateHeap( GetProcessHeap(), 0, nb_imports*sizeof(WINE_MODREF *) );
|
||||
|
|
Loading…
Reference in New Issue