Commit 7b3a444e authored by Andreas Seltenreich's avatar Andreas Seltenreich
Browse files

bemain: Move obstack_free from be_finish() to finish_isa().

Otherwise repeatedly invoking be_main() leads to a double free.
parent e8e667ac
......@@ -163,6 +163,7 @@ static void finish_isa(void)
if (isa_initialized) {
isa_if->finish();
isa_initialized = false;
obstack_free(&obst, NULL);
}
}
......@@ -658,7 +659,6 @@ void be_finish(void)
pmap_destroy(env.ent_pic_symbol_map);
free_type(env.pic_trampolines_type);
free_type(env.pic_symbols_type);
obstack_free(&obst, NULL);
}
void be_main(FILE *file_handle, const char *cup_name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment