From 5031b7de4d4469ca4ae06674dd9b8e99a6df803b Mon Sep 17 00:00:00 2001 From: Fabrizio Fabbri Date: Fri, 19 Aug 2016 09:29:00 -0400 Subject: [PATCH] fix for #276 VirtualFree is invoked with wrong parameters. - VirtualFree with MEM_RELEASE must be invoked with 0 size. --- src/c/main.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c/main.d b/src/c/main.d index 981da13c0..1d0ecb0a4 100755 --- a/src/c/main.d +++ b/src/c/main.d @@ -201,7 +201,7 @@ _ecl_dealloc_env(cl_env_ptr env) ecl_internal_error("Unable to deallocate environment structure."); #else # if defined(ECL_USE_GUARD_PAGE) - if (!VirtualFree(env, sizeof(*env), MEM_RELEASE)) + if (!VirtualFree(env, 0, MEM_RELEASE)) ecl_internal_error("Unable to deallocate environment structure."); # endif #endif