Commit 4bcd7921 authored by Timo Teräs's avatar Timo Teräs

io: fix fd leak in error handling paths

apk_dir_foreach_file and apk_resolve_[ug]id needs to free the fd in
case fdopen/fdopendir fails. Additionally this does not rely on fdopen
to fail if openat() returned -1, making sure that we don't call any
syscalls with invalid file handle.
parent 1b954e41
Pipeline #78522 passed with stage
in 1 minute and 19 seconds