diff options
Diffstat (limited to 'winsup/cygwin/dlfcn.cc')
-rw-r--r-- | winsup/cygwin/dlfcn.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index 5bea77419..3893045b3 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc @@ -145,12 +145,10 @@ int dlclose (void *handle) { int ret = -1; - void *temphandle = (void *) GetModuleHandle (NULL); - if (temphandle == handle || FreeLibrary ((HMODULE) handle)) + if (handle == GetModuleHandle (NULL) || FreeLibrary ((HMODULE) handle)) ret = 0; if (ret) set_dl_error ("dlclose"); - CloseHandle ((HMODULE) temphandle); return ret; } |