Update mod.rs

This commit is contained in:
Oliver Schneider 2017-06-22 11:40:06 +02:00 committed by GitHub
parent a805606d45
commit 8733bd0e7c

View File

@ -572,7 +572,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
"free" => {
let ptr = args[0].read_ptr(&self.memory)?;
if !ptr.is_null() {
if !ptr.is_null()? {
self.memory.deallocate(ptr.to_ptr()?)?;
}
}