diff options
author | Gavin Howard <gavin@yzena.com> | 2021-07-21 16:17:27 -0600 |
---|---|---|
committer | Gavin Howard <gavin@yzena.com> | 2021-07-21 16:17:27 -0600 |
commit | 540ce782b2605afb5a60676ed69aa2f828506326 (patch) | |
tree | 96cbe42e8f12365a8cbd74603fa8ee2f51fd330f /src | |
parent | e63c29a57f56e886eb571ea28e21b4d42af581d5 (diff) | |
download | platform_external_bc-540ce782b2605afb5a60676ed69aa2f828506326.tar.gz platform_external_bc-540ce782b2605afb5a60676ed69aa2f828506326.tar.bz2 platform_external_bc-540ce782b2605afb5a60676ed69aa2f828506326.zip |
Fix a memory leak found by running tests after last commit
Signed-off-by: Gavin Howard <gavin@yzena.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/program.c | 1 | ||||
-rw-r--r-- | src/vm.c | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/program.c b/src/program.c index 2e86310b..d69412da 100644 --- a/src/program.c +++ b/src/program.c @@ -2872,6 +2872,7 @@ void bc_program_exec(BcProgram *p) { // We want to flush right away to save the output for history, // if history must preserve it when taking input. bc_file_flush(&vm.fout, bc_flush_save); + break; } @@ -535,10 +535,7 @@ void bc_vm_shutdown(void) { bc_parse_free(&vm.prs); bc_program_free(&vm.prog); -#if BC_ENABLED - if (BC_IS_BC) bc_slabvec_free(&vm.other_slabs); -#endif // BC_ENABLED - + bc_slabvec_free(&vm.other_slabs); bc_slabvec_free(&vm.main_slabs); bc_slabvec_free(&vm.main_const_slab); #endif // !BC_ENABLE_LIBRARY |