Skip to content

Commit

Permalink
clippy clean
Browse files Browse the repository at this point in the history
Signed-off-by: MorningTZH <[email protected]>
  • Loading branch information
morningtzh committed Jan 9, 2025
1 parent 27e131a commit 192cbbe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions runc/src/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,16 @@ impl Sandboxer for RuncSandboxer {
let mut sandbox = sandbox.lock().await;
let mut sandbox_parent = self.sandbox_parent.lock().await;
let sandbox_pid = sandbox_parent.fork_sandbox_process(id, &sandbox.data.netns)?;
sandbox.prepare_sandbox_ns(sandbox_pid).await.map_err(|e| {
sandbox.prepare_sandbox_ns(sandbox_pid).await.inspect_err(|_| {
kill(Pid::from_raw(sandbox_pid), Signal::SIGKILL).unwrap_or_default();
e
})?;

sandbox
.data
.task_address
.clone_from(&format!("ttrpc+{}", self.task_address));
sandbox.dump().await.map_err(|e| {
sandbox.dump().await.inspect_err(|_| {
kill(Pid::from_raw(sandbox_pid), Signal::SIGKILL).unwrap_or_default();
e
})?;
Ok(())
}
Expand Down

0 comments on commit 192cbbe

Please sign in to comment.