diff options
Diffstat (limited to 'win/tclWinFile.c')
-rwxr-xr-x | win/tclWinFile.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 3655321..1536bc0 100755 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -1394,6 +1394,12 @@ NativeMatchType( return 1; } +static void +FreeLoadLibHandle( + ClientData clientData) +{ + FreeLibrary((HMODULE)clientData); +} /* *---------------------------------------------------------------------- * @@ -1445,13 +1451,13 @@ TclpGetUserHome( GetProcAddress(handle, "NetGetDCName"); netUserGetInfoProc = (NETUSERGETINFOPROC *) GetProcAddress(handle, "NetUserGetInfo"); - Tcl_CreateExitHandler(TclpUnloadFile, handle); + Tcl_CreateExitHandler(FreeLoadLibHandle, handle); } handle = LoadLibraryA("userenv.dll"); if (handle) { getProfilesDirectoryProc = (GETPROFILESDIRECTORYPROC *) GetProcAddress(handle, "GetProfilesDirectoryW"); - Tcl_CreateExitHandler(TclpUnloadFile, handle); + Tcl_CreateExitHandler(FreeLoadLibHandle, handle); } apistubs = -1; |