bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH hurd 2/2] utils/rpctrace: fix notification port handling


From: Justus Winter
Subject: [PATCH hurd 2/2] utils/rpctrace: fix notification port handling
Date: Tue, 20 Jan 2015 20:30:59 +0100

* utils/rpctrace.c (new_receiver_info): Fix handling of old
notification port.
---
 utils/rpctrace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index 62d3c87..48daa07 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -404,7 +404,8 @@ new_receiver_info (mach_port_t right, mach_port_t owner)
                                        MACH_MSG_TYPE_MAKE_SEND_ONCE, &foo);
   if (err)
     error (2, err, "mach_port_request_notification");
-  mach_port_deallocate (mach_task_self (), foo);
+  if (MACH_PORT_VALID (foo))
+    mach_port_deallocate (mach_task_self (), foo);
 
   err = hurd_ihash_add (&traced_names, info->forward, info);
   if (err)
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]