From e35410c6de31b79a671317f9e07a026f864b8d51 Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Thu, 5 Jun 2025 20:09:37 +0800 Subject: [PATCH] :bug: fix memory leak --- src/nasal_import.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nasal_import.cpp b/src/nasal_import.cpp index a3c6228..8fd893e 100644 --- a/src/nasal_import.cpp +++ b/src/nasal_import.cpp @@ -330,11 +330,11 @@ return_expr* linker::generate_module_return(code_block* block) { auto value = new hash_expr(block->get_location()); result->set_value(value); for (const auto& i : finder->do_find(block)) { - auto pair = new hash_pair(block->get_location()); // do not export symbol begins with '_' if (i.name.length() && i.name[0]=='_') { continue; } + auto pair = new hash_pair(block->get_location()); pair->set_name(i.name); pair->set_value(new identifier(block->get_location(), i.name)); value->add_member(pair);