From a6cab24dc057f87dce7cd3134a096725fc31d556 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 28 Mar 2020 14:32:50 +0100 Subject: [PATCH] we don't deallocate the environ global, so leave it in the machine --- src/shims/env.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shims/env.rs b/src/shims/env.rs index 6cde82903bcc..163a8c2e51d7 100644 --- a/src/shims/env.rs +++ b/src/shims/env.rs @@ -55,7 +55,7 @@ impl<'tcx> EnvVars<'tcx> { ecx.memory.deallocate(ptr, None, MiriMemoryKind::Env.into())?; } // Deallocate environ var list. - let environ = ecx.machine.env_vars.environ.take().unwrap(); + let environ = ecx.machine.env_vars.environ.unwrap(); let old_vars_ptr = ecx.read_scalar(environ.into())?.not_undef()?; ecx.memory.deallocate(ecx.force_ptr(old_vars_ptr)?, None, MiriMemoryKind::Env.into())?; Ok(())