From be1cabba238ce5af7a11a852d9d528aa2f102c42 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 10 Jul 2007 01:21:03 +0000 Subject: * debug.cc (close_handle): Change debug output format slightly. * dlfcn.cc (dlclose): Don't close handle returned from GetModuleHandle(NULL). * fhandler.h (fhandler_pipe::create): Remove obsolete argument. (fhandler_pipe::create): Ditto. * fhandler.cc (fhandler_pipe::create): Ditto. (fhandler_pipe::create): Ditto. --- winsup/cygwin/dlfcn.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'winsup/cygwin/dlfcn.cc') 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; } -- cgit v1.2.3