Close open file on more error paths

This commit is contained in:
Joshua Bell 2021-12-06 20:47:15 -08:00
parent 94fae50608
commit ea853d7af1
1 changed files with 3 additions and 2 deletions

View File

@ -219,6 +219,7 @@ block_len = $200
;; Read first "block"
MLI_CALL READ, read_block_params
bcc :+
MLI_CALL CLOSE, close_params
jmp on_error
;; Get sizes out of header
@ -339,9 +340,9 @@ not_found:
sta close_params::ref_num
MLI_CALL READ, read_params
bcs on_error
php
MLI_CALL CLOSE, close_params
plp
bcs on_error
jmp SYS_ADDR ; Invoke loaded SYSTEM file