syscall: vm-object: fix dangling reference to newly-created object

This commit is contained in:
2026-03-18 21:02:19 +00:00
parent 2a1a0cf14d
commit d801203f04

View File

@@ -29,12 +29,9 @@ kern_status_t sys_vm_object_create(
kern_status_t status kern_status_t status
= task_open_handle(self, &obj->vo_base, 0, out_handle); = task_open_handle(self, &obj->vo_base, 0, out_handle);
if (status != KERN_OK) { object_unref(&obj->vo_base);
object_unref(&obj->vo_base);
return status;
}
return KERN_OK; return status;
} }
kern_status_t sys_vm_object_read( kern_status_t sys_vm_object_read(