diff --git a/source/main.cpp b/source/main.cpp index 8344bcc..ea9616f 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -366,6 +366,7 @@ void LoadAndRunModule(std::string_view filepath, std::string_view environment_pa auto moduleInfo = std::move(*moduleInfoOpt); auto moduleInfoPtr = (module_information_t *) moduleInfo.data(); + *moduleInfoPtr = {}; // Frees automatically, must not survive the heapWrapper. auto moduleData = ModuleDataFactory::load(reader, *heapWrapperOpt, moduleInfoPtr->trampolines, sizeof(moduleInfoPtr->trampolines) / sizeof(moduleInfoPtr->trampolines[0]));