diff --git a/target-i386/helper.c b/target-i386/helper.c
index 2b59f2368a656644a074ed699cc2817825ba2eb8..594aa9637a73e5294d5cba4dafa4ac80a8f81c64 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -433,7 +433,7 @@ void cpu_reset(CPUX86State *env)
 
 void cpu_x86_close(CPUX86State *env)
 {
-    free(env);
+    qemu_free(env);
 }
 
 /***********************************************************/