Commit d1a3bad7 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

advpack/tests: Free the library after use.

parent 675ed5a9
......@@ -35,6 +35,7 @@
#define REG_VAL_EXISTS(key, value) !RegQueryValueEx(key, value, NULL, NULL, NULL, NULL)
#define OPEN_GUID_KEY() !RegOpenKey(HKEY_LOCAL_MACHINE, GUID_KEY, &guid)
static HMODULE hAdvPack;
static HRESULT (WINAPI *pCloseINFEngine)(HINF);
static HRESULT (WINAPI *pDelNode)(LPCSTR,DWORD);
static HRESULT (WINAPI *pGetVersionFromFile)(LPCSTR,LPDWORD,LPDWORD,BOOL);
......@@ -66,7 +67,7 @@ static void get_progfiles_dir(void)
static BOOL init_function_pointers(void)
{
HMODULE hAdvPack = LoadLibraryA("advpack.dll");
hAdvPack = LoadLibraryA("advpack.dll");
if (!hAdvPack)
return FALSE;
......@@ -594,4 +595,6 @@ START_TEST(advpack)
setperusersecvalues_test();
translateinfstring_test();
translateinfstringex_test();
FreeLibrary(hAdvPack);
}
......@@ -560,4 +560,6 @@ START_TEST(files)
test_AdvInstallFile();
delete_test_files();
FreeLibrary(hAdvPack);
}
......@@ -23,6 +23,7 @@
#include <advpub.h>
#include "wine/test.h"
static HMODULE hAdvPack;
/* function pointers */
static HRESULT (WINAPI *pRunSetupCommand)(HWND, LPCSTR, LPCSTR, LPCSTR, LPCSTR, HANDLE*, DWORD, LPVOID);
static HRESULT (WINAPI *pLaunchINFSection)(HWND, HINSTANCE, LPSTR, INT);
......@@ -32,7 +33,7 @@ static char CURR_DIR[MAX_PATH];
static BOOL init_function_pointers(void)
{
HMODULE hAdvPack = LoadLibraryA("advpack.dll");
hAdvPack = LoadLibraryA("advpack.dll");
if (!hAdvPack)
return FALSE;
......@@ -273,4 +274,6 @@ START_TEST(install)
test_RunSetupCommand();
test_LaunchINFSection();
test_LaunchINFSectionEx();
FreeLibrary(hAdvPack);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment