Skip to content

Commit

Permalink
Close open file on more error paths
Browse files Browse the repository at this point in the history
  • Loading branch information
inexorabletash committed Dec 7, 2021
1 parent 94fae50 commit ea853d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inc/driver_preamble.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ea853d7

Please sign in to comment.