Alexandre Julliard : ntdll:
Avoid activation context leak for dlls with no imports.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jul 30 16:52:29 CDT 2007
Module: wine
Branch: master
Commit: 4e4c150bede97661345c67d3ae15eb81f80feefd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e4c150bede97661345c67d3ae15eb81f80feefd
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jul 30 23:37:39 2007 +0200
ntdll: Avoid activation context leak for dlls with no imports.
---
dlls/ntdll/loader.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 09516f6..a37394d 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -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 *) );
More information about the wine-cvs
mailing list