summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-04-11 15:01:52 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-04-11 15:08:17 +0300
commit6552a1d3f8126d858d64c75fa3c1eb049d8bf235 (patch)
tree95ab25d8881aaafff88b11c2511c57f7e0a16fa2 /test
parent1096e3ce154e0a702ca7fdec783452b96b79d78c (diff)
downloadapk-tools-6552a1d3f8126d858d64c75fa3c1eb049d8bf235.tar.gz
apk-tools-6552a1d3f8126d858d64c75fa3c1eb049d8bf235.tar.bz2
apk-tools-6552a1d3f8126d858d64c75fa3c1eb049d8bf235.tar.xz
apk-tools-6552a1d3f8126d858d64c75fa3c1eb049d8bf235.zip
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. (cherry picked from commit 3c339a74d1b9dba23d60d6c769d99227d75cc6dc)
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions