[PATCH] advapi32/tests: Fix resource leak.

Alexandre Julliard julliard at winehq.org
Thu Jan 4 04:28:04 CST 2018


Andrey Gusev <andrey.goosev at gmail.com> writes:

> Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
> ---
>  dlls/advapi32/tests/security.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
> index 51dcf90851..4e584eb08f 100644
> --- a/dlls/advapi32/tests/security.c
> +++ b/dlls/advapi32/tests/security.c
> @@ -3036,6 +3036,7 @@ static void test_process_security_child(void)
>      handle = OpenProcess( PROCESS_VM_READ, FALSE, GetCurrentProcessId() );
>      todo_wine
>      ok(handle == NULL, "OpenProcess(PROCESS_VM_READ) should have failed\n");
> +    CloseHandle( handle );

That's not very useful since it's supposed to fail. If the goal is to
close it because it wrongly succeeds on Wine, there are more places that
would need the same thing.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list