Merge pull request #71 from ValKmjolnir/develop
Nasal Interpreter Test / mac-aarch64 (push) Has been cancelled Details
Nasal Interpreter Test / linux-x86_64 (push) Has been cancelled Details

🐛 fix memory leak
This commit is contained in:
ValK 2025-06-05 20:12:20 +08:00 committed by GitHub
commit c08befd0c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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);