commit | 8ac326d6d0fa8b4d3a86e332dfdb2d9e77c8c484 | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | Wed Apr 10 23:50:34 2024 +0200 |
committer | Tom Rini <trini@konsulko.com> | Wed Apr 17 17:06:16 2024 -0600 |
tree | 477536ef7d6a78755acf46f58ae68cd7767a1d69 | |
parent | 8b0599edadd6c7a19abb297675a091ec955c9995 [diff] |
sandbox: don't call os_close with invalid file descriptor If open() fails it returns -1. Calling close() with this value makes no sense. Return -EIO instead. Addresses-Coverity-ID: 185828 Improper use of negative value Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Fixes: 566bf3a8698 ("sandbox: Add a function to read a host file") Reviewed-by: Sean Anderson <seanga2@gmail.com>