* dir.cc (opendir): Detect error return from build_fhandler_from_name.
This commit is contained in:
parent
98a05abd05
commit
5a88f2554a
|
@ -1,3 +1,7 @@
|
||||||
|
2001-12-05 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* dir.cc (opendir): Detect error return from build_fhandler_from_name.
|
||||||
|
|
||||||
2001-12-04 David Rothenberger <daveroth@acm.org>
|
2001-12-04 David Rothenberger <daveroth@acm.org>
|
||||||
|
|
||||||
* net.cc (cygwin_getsockopt): Dereference optlen pointer when passing
|
* net.cc (cygwin_getsockopt): Dereference optlen pointer when passing
|
||||||
|
|
|
@ -82,13 +82,18 @@ opendir (const char *name)
|
||||||
{
|
{
|
||||||
fhandler_base *fh;
|
fhandler_base *fh;
|
||||||
path_conv pc;
|
path_conv pc;
|
||||||
DIR *res = NULL;
|
DIR *res;
|
||||||
|
|
||||||
fh = cygheap->fdtab.build_fhandler_from_name (-1, name, NULL, pc,
|
fh = cygheap->fdtab.build_fhandler_from_name (-1, name, NULL, pc,
|
||||||
PC_SYM_FOLLOW | PC_FULL, NULL);
|
PC_SYM_FOLLOW | PC_FULL, NULL);
|
||||||
res = fh->opendir (pc);
|
if (!fh)
|
||||||
if (!res)
|
res = NULL;
|
||||||
delete fh;
|
else
|
||||||
|
{
|
||||||
|
res = fh->opendir (pc);
|
||||||
|
if (!res)
|
||||||
|
delete fh;
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue