mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 12:05:47 +08:00
* fhandler_netdrive.cc (fhandler_netdrive::exists): Always free WNet
resource if created.
This commit is contained in:
parent
4f5feab5ea
commit
80a10a3972
@ -1,3 +1,8 @@
|
|||||||
|
2010-06-01 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_netdrive.cc (fhandler_netdrive::exists): Always free WNet
|
||||||
|
resource if created.
|
||||||
|
|
||||||
2010-05-31 Corinna Vinschen <corinna@vinschen.de>
|
2010-05-31 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* cygheap.cc (cygheap_user::set_name): Allow to change the user name
|
* cygheap.cc (cygheap_user::set_name): Allow to change the user name
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* fhandler_netdrive.cc: fhandler for // and //MACHINE handling
|
/* fhandler_netdrive.cc: fhandler for // and //MACHINE handling
|
||||||
|
|
||||||
Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
|
Copyright 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -164,15 +164,9 @@ fhandler_netdrive::exists ()
|
|||||||
nr.lpRemoteName = namebuf;
|
nr.lpRemoteName = namebuf;
|
||||||
DWORD ret = create_thread_and_wait (GET_RESOURCE_OPENENUM,
|
DWORD ret = create_thread_and_wait (GET_RESOURCE_OPENENUM,
|
||||||
&nr, &nh, 0, "WNetOpenEnum");
|
&nr, &nh, 0, "WNetOpenEnum");
|
||||||
if (ret != NO_ERROR)
|
|
||||||
{
|
|
||||||
if (nh.dom)
|
if (nh.dom)
|
||||||
WNetCloseEnum (nh.dom);
|
WNetCloseEnum (nh.dom);
|
||||||
if (nh.net)
|
return ret != NO_ERROR ? 0 : 1;
|
||||||
WNetCloseEnum (nh.net);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fhandler_netdrive::fhandler_netdrive ():
|
fhandler_netdrive::fhandler_netdrive ():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user