summaryrefslogtreecommitdiff
path: root/libports
diff options
context:
space:
mode:
Diffstat (limited to 'libports')
-rw-r--r--libports/manage-multithread.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index 7027f928..87a9d278 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -63,10 +63,15 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket,
}
pi = ports_lookup_port (bucket, inp->msgh_local_port, 0);
- ports_begin_rpc (pi, &link);
- status = demuxer (inp, outp);
- ports_end_rpc (pi, &link);
- ports_port_deref (pi);
+ if (pi)
+ {
+ ports_begin_rpc (pi, &link);
+ status = demuxer (inp, outp);
+ ports_end_rpc (pi, &link);
+ ports_port_deref (pi);
+ }
+ else
+ status = 0;
spin_lock (&lock);
nreqthreads++;