diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 53602845e05..96b85b99f9f 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1365,6 +1365,7 @@ static void get_user_sid(LPSTR *usersid) GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); + CloseHandle(token); } static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val) diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index fba584dca89..da89faabf40 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -525,6 +525,7 @@ static void get_user_sid(LPSTR *usersid) GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); + CloseHandle(token); } static void test_MsiQueryProductState(void) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 66ff3f0ebca..04ad64c83e3 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -51,6 +51,7 @@ static void get_user_sid(LPSTR *usersid) GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); + CloseHandle(token); } /* RegDeleteTreeW from dlls/advapi32/registry.c */ diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index 2eb5f1815ec..5e21d67cad8 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -139,6 +139,7 @@ static int get_user_sid(LPSTR *usersid) GetTokenInformation(token, TokenUser, buf, size, &size); user = (PTOKEN_USER)buf; pConvertSidToStringSidA(user->User.Sid, usersid); + CloseHandle(token); return 1; }