summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/net.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-09 20:56:44 +0000
committerChristopher Faylor <me@cgf.cx>2005-03-09 20:56:44 +0000
commitb364b3986758d395ab97117a9543dc816fc34bd2 (patch)
treef41f8dafdaa8dc12e6b5bed70d4cfd47adaacd81 /winsup/cygwin/net.cc
parentf5394c956013e131600375256758c8530096538f (diff)
downloadcygnal-b364b3986758d395ab97117a9543dc816fc34bd2.tar.gz
cygnal-b364b3986758d395ab97117a9543dc816fc34bd2.tar.bz2
cygnal-b364b3986758d395ab97117a9543dc816fc34bd2.zip
* net.cc (dup_ent): Avoid dereferencing a null pointer in a debug_printf.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 3fee9eb91..ed52807d6 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -389,7 +389,7 @@ dup_ent (void *old, void *src0, struct_type type)
if (old)
{
debug_printf ("freeing old %sent structure \"%s\" %p\n", entnames[type],
- ((unionent *) old)->name, old);
+ old ? ((unionent *) old)->name : "<null!>", old);
free (old);
}