mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
msi/tests: Fix a couple of user SID string leaks.
Found by valgrind.
This commit is contained in:
parent
248939d358
commit
3f70b07870
@ -3944,6 +3944,7 @@ static void test_publish_registeruser(void)
|
|||||||
DeleteFile(msifile);
|
DeleteFile(msifile);
|
||||||
DeleteFile("msitest\\maximus");
|
DeleteFile("msitest\\maximus");
|
||||||
RemoveDirectory("msitest");
|
RemoveDirectory("msitest");
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_publish_processcomponents(void)
|
static void test_publish_processcomponents(void)
|
||||||
@ -4068,6 +4069,7 @@ static void test_publish_processcomponents(void)
|
|||||||
DeleteFile(msifile);
|
DeleteFile(msifile);
|
||||||
DeleteFile("msitest\\maximus");
|
DeleteFile("msitest\\maximus");
|
||||||
RemoveDirectory("msitest");
|
RemoveDirectory("msitest");
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_publish(void)
|
static void test_publish(void)
|
||||||
|
@ -1201,6 +1201,7 @@ static void test_MsiQueryFeatureState(void)
|
|||||||
RegCloseKey(compkey2);
|
RegCloseKey(compkey2);
|
||||||
RegCloseKey(localkey);
|
RegCloseKey(localkey);
|
||||||
RegCloseKey(userkey);
|
RegCloseKey(userkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiQueryComponentState(void)
|
static void test_MsiQueryComponentState(void)
|
||||||
@ -1520,6 +1521,7 @@ static void test_MsiQueryComponentState(void)
|
|||||||
RegDeleteKeyA(compkey, "");
|
RegDeleteKeyA(compkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
RegCloseKey(compkey);
|
RegCloseKey(compkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiGetComponentPath(void)
|
static void test_MsiGetComponentPath(void)
|
||||||
@ -1872,6 +1874,7 @@ static void test_MsiGetComponentPath(void)
|
|||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
RegCloseKey(compkey);
|
RegCloseKey(compkey);
|
||||||
DeleteFileA("C:\\imapath");
|
DeleteFileA("C:\\imapath");
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiGetProductCode(void)
|
static void test_MsiGetProductCode(void)
|
||||||
@ -2128,6 +2131,7 @@ static void test_MsiGetProductCode(void)
|
|||||||
RegDeleteValueA(compkey, prod2_squashed);
|
RegDeleteValueA(compkey, prod2_squashed);
|
||||||
RegDeleteKeyA(compkey, "");
|
RegDeleteKeyA(compkey, "");
|
||||||
RegCloseKey(compkey);
|
RegCloseKey(compkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiEnumClients(void)
|
static void test_MsiEnumClients(void)
|
||||||
@ -2314,6 +2318,7 @@ static void test_MsiEnumClients(void)
|
|||||||
RegDeleteValueA(compkey, prod2_squashed);
|
RegDeleteValueA(compkey, prod2_squashed);
|
||||||
RegDeleteKeyA(compkey, "");
|
RegDeleteKeyA(compkey, "");
|
||||||
RegCloseKey(compkey);
|
RegCloseKey(compkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void get_version_info(LPSTR path, LPSTR *vercheck, LPDWORD verchecksz,
|
static void get_version_info(LPSTR path, LPSTR *vercheck, LPDWORD verchecksz,
|
||||||
@ -3845,6 +3850,7 @@ static void test_MsiGetProductInfo(void)
|
|||||||
RegCloseKey(localkey);
|
RegCloseKey(localkey);
|
||||||
RegCloseKey(source);
|
RegCloseKey(source);
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiGetProductInfoEx(void)
|
static void test_MsiGetProductInfoEx(void)
|
||||||
@ -6582,6 +6588,7 @@ static void test_MsiGetProductInfoEx(void)
|
|||||||
RegDeleteValueA(prodkey, "HelpLink");
|
RegDeleteValueA(prodkey, "HelpLink");
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define INIT_USERINFO() \
|
#define INIT_USERINFO() \
|
||||||
@ -7161,6 +7168,7 @@ static void test_MsiGetUserInfo(void)
|
|||||||
RegCloseKey(userprod);
|
RegCloseKey(userprod);
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiOpenProduct(void)
|
static void test_MsiOpenProduct(void)
|
||||||
@ -7473,6 +7481,7 @@ static void test_MsiOpenProduct(void)
|
|||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
|
||||||
DeleteFileA(msifile);
|
DeleteFileA(msifile);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid)
|
static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid)
|
||||||
@ -9201,6 +9210,7 @@ static void test_MsiEnumPatchesEx(void)
|
|||||||
test_MsiEnumPatchesEx_userunmanaged(NULL, usersid);
|
test_MsiEnumPatchesEx_userunmanaged(NULL, usersid);
|
||||||
/* FIXME: Successfully test userunmanaged with a different user */
|
/* FIXME: Successfully test userunmanaged with a different user */
|
||||||
test_MsiEnumPatchesEx_machine();
|
test_MsiEnumPatchesEx_machine();
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiEnumPatches(void)
|
static void test_MsiEnumPatches(void)
|
||||||
@ -9864,6 +9874,7 @@ static void test_MsiEnumPatches(void)
|
|||||||
RegCloseKey(udprod);
|
RegCloseKey(udprod);
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiGetPatchInfoEx(void)
|
static void test_MsiGetPatchInfoEx(void)
|
||||||
@ -10876,6 +10887,7 @@ static void test_MsiGetPatchInfoEx(void)
|
|||||||
RegCloseKey(props);
|
RegCloseKey(props);
|
||||||
RegDeleteKeyA(udprod, "");
|
RegDeleteKeyA(udprod, "");
|
||||||
RegCloseKey(udprod);
|
RegCloseKey(udprod);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiEnumProducts(void)
|
static void test_MsiEnumProducts(void)
|
||||||
|
@ -628,6 +628,7 @@ static void test_MsiSourceListGetInfo(void)
|
|||||||
RegDeleteKeyA(userkey, "");
|
RegDeleteKeyA(userkey, "");
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
RegCloseKey(userkey);
|
RegCloseKey(userkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiSourceListAddSourceEx(void)
|
static void test_MsiSourceListAddSourceEx(void)
|
||||||
@ -1605,6 +1606,7 @@ static void test_MsiSourceListEnumSources(void)
|
|||||||
RegCloseKey(source);
|
RegCloseKey(source);
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiSourceListSetInfo(void)
|
static void test_MsiSourceListSetInfo(void)
|
||||||
@ -2015,6 +2017,7 @@ static void test_MsiSourceListSetInfo(void)
|
|||||||
RegCloseKey(source);
|
RegCloseKey(source);
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiSourceListAddMediaDisk(void)
|
static void test_MsiSourceListAddMediaDisk(void)
|
||||||
@ -2312,6 +2315,7 @@ static void test_MsiSourceListAddMediaDisk(void)
|
|||||||
RegCloseKey(source);
|
RegCloseKey(source);
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiSourceListEnumMediaDisks(void)
|
static void test_MsiSourceListEnumMediaDisks(void)
|
||||||
@ -3114,6 +3118,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
|
|||||||
RegCloseKey(source);
|
RegCloseKey(source);
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_MsiSourceListAddSource(void)
|
static void test_MsiSourceListAddSource(void)
|
||||||
@ -3369,6 +3374,7 @@ static void test_MsiSourceListAddSource(void)
|
|||||||
RegCloseKey(source);
|
RegCloseKey(source);
|
||||||
RegDeleteKeyA(prodkey, "");
|
RegDeleteKeyA(prodkey, "");
|
||||||
RegCloseKey(prodkey);
|
RegCloseKey(prodkey);
|
||||||
|
LocalFree(usersid);
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(source)
|
START_TEST(source)
|
||||||
|
Loading…
Reference in New Issue
Block a user