Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-04-07 21:32:44 +0400
committerChristopher Faylor <me@cgf.cx>2012-04-07 21:32:44 +0400
commite5b7e4d1c796b0a07b3c9af7fbb8ad9d9db2f50c (patch)
tree6a3ae2bdc4a9a3d8a196b3d6fce2e1956a2ec56c /winsup/cygwin/mmap.cc
parent00ceaad13411f75e1a8d203e7506287e4170357f (diff)
* dtable.cc (cygwin_attach_handle_to_fd): Defend against NULL return from
build_fh_*. (dtable::init_std_file_from_handle): Ditto. * mmap.cc (mmap_record::alloc_fh): Ditto. * path.cc (path_conv::check): Ditto.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r--winsup/cygwin/mmap.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 2a22a4323..d8d78a51a 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -526,7 +526,8 @@ mmap_record::alloc_fh ()
fdev.name = fdev.native = "";
fdev.parse (get_device ());
fhandler_base *fh = build_fh_dev (fdev);
- fh->set_access (get_openflags ());
+ if (fh)
+ fh->set_access (get_openflags ());
return fh;
}