summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libports/port-deref.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libports/port-deref.c b/libports/port-deref.c
index a1238315..1ded45d9 100644
--- a/libports/port-deref.c
+++ b/libports/port-deref.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001 Free Software Foundation, Inc.
Written by Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -32,11 +32,11 @@ ports_port_deref (void *portstruct)
mutex_lock (&_ports_lock);
- if (pi->refcnt == 1 && pi->weakrefcnt && !trieddroppingweakrefs)
+ if (pi->refcnt == 1 && pi->weakrefcnt
+ && pi->class->dropweak_routine && !trieddroppingweakrefs)
{
mutex_unlock (&_ports_lock);
- if (pi->class->dropweak_routine)
- (*pi->class->dropweak_routine) (pi);
+ (*pi->class->dropweak_routine) (pi);
trieddroppingweakrefs = 1;
goto retry;
}