syscall: vm-object: fix dangling reference to newly-created object
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user