Skip to content

Commit c89076b

Browse files
committed
Auto merge of #1273 - RalfJung:environ-cleanup, r=RalfJung
we don't deallocate the environ global, so leave it in the machine Follow-up to #1271. I forgot to adjust this when my plans changed a bit.
2 parents f0afdc3 + a6cab24 commit c89076b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl<'tcx> EnvVars<'tcx> {
5555
ecx.memory.deallocate(ptr, None, MiriMemoryKind::Env.into())?;
5656
}
5757
// Deallocate environ var list.
58-
let environ = ecx.machine.env_vars.environ.take().unwrap();
58+
let environ = ecx.machine.env_vars.environ.unwrap();
5959
let old_vars_ptr = ecx.read_scalar(environ.into())?.not_undef()?;
6060
ecx.memory.deallocate(ecx.force_ptr(old_vars_ptr)?, None, MiriMemoryKind::Env.into())?;
6161
Ok(())

0 commit comments

Comments
 (0)