diff options
Diffstat (limited to 'util/libreboot-utils/lib/state.c')
| -rw-r--r-- | util/libreboot-utils/lib/state.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/util/libreboot-utils/lib/state.c b/util/libreboot-utils/lib/state.c index a3ad0f1e..b7701f0d 100644 --- a/util/libreboot-utils/lib/state.c +++ b/util/libreboot-utils/lib/state.c @@ -204,28 +204,13 @@ exit_cleanup(void) if (x != NULL) { f = &x->f; - if (f->gbe_fd > -1) { - if (close_on_eintr(f->gbe_fd) == -1) { - f->gbe_fd = -1; - close_err = 1; - } - f->gbe_fd = -1; - } - - if (f->tmp_fd > -1) { - if (close_on_eintr(f->tmp_fd) == -1) { - f->tmp_fd = -1; - close_err = 1; - } - f->tmp_fd = -1; - } + close_no_err(&f->gbe_fd); + close_no_err(&f->tmp_fd); + close_no_err(&f->tmp_fd); - if (f->tname != NULL) { + if (f->tname != NULL) if (unlink(f->tname) == -1) close_err = 1; - } - - f->tmp_fd = -1; } if (saved_errno) |
