msi/tests: Fix a couple of user SID string leaks.

Found by valgrind.
This commit is contained in:
Hans Leidekker 2009-10-27 10:07:25 +01:00 committed by Alexandre Julliard
parent 248939d358
commit 3f70b07870
3 changed files with 20 additions and 0 deletions

View File

@ -3944,6 +3944,7 @@ static void test_publish_registeruser(void)
DeleteFile(msifile);
DeleteFile("msitest\\maximus");
RemoveDirectory("msitest");
LocalFree(usersid);
}
static void test_publish_processcomponents(void)
@ -4068,6 +4069,7 @@ static void test_publish_processcomponents(void)
DeleteFile(msifile);
DeleteFile("msitest\\maximus");
RemoveDirectory("msitest");
LocalFree(usersid);
}
static void test_publish(void)

View File

@ -1201,6 +1201,7 @@ static void test_MsiQueryFeatureState(void)
RegCloseKey(compkey2);
RegCloseKey(localkey);
RegCloseKey(userkey);
LocalFree(usersid);
}
static void test_MsiQueryComponentState(void)
@ -1520,6 +1521,7 @@ static void test_MsiQueryComponentState(void)
RegDeleteKeyA(compkey, "");
RegCloseKey(prodkey);
RegCloseKey(compkey);
LocalFree(usersid);
}
static void test_MsiGetComponentPath(void)
@ -1872,6 +1874,7 @@ static void test_MsiGetComponentPath(void)
RegCloseKey(prodkey);
RegCloseKey(compkey);
DeleteFileA("C:\\imapath");
LocalFree(usersid);
}
static void test_MsiGetProductCode(void)
@ -2128,6 +2131,7 @@ static void test_MsiGetProductCode(void)
RegDeleteValueA(compkey, prod2_squashed);
RegDeleteKeyA(compkey, "");
RegCloseKey(compkey);
LocalFree(usersid);
}
static void test_MsiEnumClients(void)
@ -2314,6 +2318,7 @@ static void test_MsiEnumClients(void)
RegDeleteValueA(compkey, prod2_squashed);
RegDeleteKeyA(compkey, "");
RegCloseKey(compkey);
LocalFree(usersid);
}
static void get_version_info(LPSTR path, LPSTR *vercheck, LPDWORD verchecksz,
@ -3845,6 +3850,7 @@ static void test_MsiGetProductInfo(void)
RegCloseKey(localkey);
RegCloseKey(source);
RegCloseKey(prodkey);
LocalFree(usersid);
}
static void test_MsiGetProductInfoEx(void)
@ -6582,6 +6588,7 @@ static void test_MsiGetProductInfoEx(void)
RegDeleteValueA(prodkey, "HelpLink");
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
#define INIT_USERINFO() \
@ -7161,6 +7168,7 @@ static void test_MsiGetUserInfo(void)
RegCloseKey(userprod);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
static void test_MsiOpenProduct(void)
@ -7473,6 +7481,7 @@ static void test_MsiOpenProduct(void)
RegCloseKey(prodkey);
DeleteFileA(msifile);
LocalFree(usersid);
}
static void test_MsiEnumPatchesEx_usermanaged(LPCSTR usersid, LPCSTR expectedsid)
@ -9201,6 +9210,7 @@ static void test_MsiEnumPatchesEx(void)
test_MsiEnumPatchesEx_userunmanaged(NULL, usersid);
/* FIXME: Successfully test userunmanaged with a different user */
test_MsiEnumPatchesEx_machine();
LocalFree(usersid);
}
static void test_MsiEnumPatches(void)
@ -9864,6 +9874,7 @@ static void test_MsiEnumPatches(void)
RegCloseKey(udprod);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
static void test_MsiGetPatchInfoEx(void)
@ -10876,6 +10887,7 @@ static void test_MsiGetPatchInfoEx(void)
RegCloseKey(props);
RegDeleteKeyA(udprod, "");
RegCloseKey(udprod);
LocalFree(usersid);
}
static void test_MsiEnumProducts(void)

View File

@ -628,6 +628,7 @@ static void test_MsiSourceListGetInfo(void)
RegDeleteKeyA(userkey, "");
RegCloseKey(hkey);
RegCloseKey(userkey);
LocalFree(usersid);
}
static void test_MsiSourceListAddSourceEx(void)
@ -1605,6 +1606,7 @@ static void test_MsiSourceListEnumSources(void)
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
static void test_MsiSourceListSetInfo(void)
@ -2015,6 +2017,7 @@ static void test_MsiSourceListSetInfo(void)
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
static void test_MsiSourceListAddMediaDisk(void)
@ -2312,6 +2315,7 @@ static void test_MsiSourceListAddMediaDisk(void)
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
static void test_MsiSourceListEnumMediaDisks(void)
@ -3114,6 +3118,7 @@ static void test_MsiSourceListEnumMediaDisks(void)
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
static void test_MsiSourceListAddSource(void)
@ -3369,6 +3374,7 @@ static void test_MsiSourceListAddSource(void)
RegCloseKey(source);
RegDeleteKeyA(prodkey, "");
RegCloseKey(prodkey);
LocalFree(usersid);
}
START_TEST(source)