Fix memory leak in sys_vmo_replace_as_executable (#97)

This commit is contained in:
Yuekai Jia 2020-07-08 11:05:25 +08:00 committed by GitHub
parent 3bb5974aa2
commit 2a02dbfad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ impl Syscall<'_> {
let new_handle = proc.dup_handle_operating_rights(handle, |handle_rights| {
Ok(handle_rights | Rights::EXECUTE)
})?;
proc.remove_handle(handle)?;
out.write(new_handle)?;
Ok(())
}