diff --git a/kernel/handle.c b/kernel/handle.c index 24daa8f..b123bda 100644 --- a/kernel/handle.c +++ b/kernel/handle.c @@ -232,6 +232,10 @@ kern_status_t handle_table_transfer( break; } + if (src_handle.hnd_value == KERN_HANDLE_INVALID) { + continue; + } + struct handle *src_entry = handle_table_get_handle(src, src_handle.hnd_value); struct handle *dst_entry = NULL; @@ -239,7 +243,7 @@ kern_status_t handle_table_transfer( if (!src_entry) { status = KERN_INVALID_ARGUMENT; - src_handle.hnd_result = KERN_OK; + src_handle.hnd_result = KERN_INVALID_ARGUMENT; vm_region_write_kernel( src_region, src_handle_addr,