ntdll: Fix the file mapping view leak in the case of module loading failure.

Alexandre Julliard julliard at winehq.org
Mon Feb 27 07:12:28 CST 2012


Dmitry Timoshkov <dmitry at baikal.ru> writes:

> @@ -1548,6 +1548,8 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file,
>      *pwm = wm;
>      status = STATUS_SUCCESS;
>  done:
> +    if (status && module)
> +        NtUnmapViewOfSection( NtCurrentProcess(), module );

It doesn't make sense to free the module as long as we don't free the
associated modref.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list