From 5179bcf28dac3fb39d7d4949964f038fe697bf4e Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 9 Aug 2021 21:10:29 +0200 Subject: memory_object_proxy: Fix send port right leak On success we'd have to clean the port right. Just consume it. --- vm/memory_object_proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/memory_object_proxy.c b/vm/memory_object_proxy.c index b6268d72..4ad30030 100644 --- a/vm/memory_object_proxy.c +++ b/vm/memory_object_proxy.c @@ -172,7 +172,8 @@ memory_object_create_proxy (const ipc_space_t space, vm_prot_t max_protection, ipc_port_nsrequest (proxy->port, 1, notify, ¬ify); assert (notify == IP_NULL); - proxy->object = ipc_port_copy_send (object[0]); + /* Consumes the port right */ + proxy->object = object[0]; proxy->max_protection = max_protection; proxy->start = start[0]; proxy->len = len[0]; -- cgit v1.2.3