diff options
author | Fabian Groffen <grobian@gentoo.org> | 2020-01-25 13:19:25 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2020-01-25 13:19:25 +0100 |
commit | 169ad2331b0a84f8a960402b04077ece57bb35e2 (patch) | |
tree | 6a84582d3728e01517a1b02a2be9fe181ca7f2eb /qpkg.c | |
parent | qpkg: change smiley in comment not to upset rediculous style check (diff) | |
download | portage-utils-169ad2331b0a84f8a960402b04077ece57bb35e2.tar.gz portage-utils-169ad2331b0a84f8a960402b04077ece57bb35e2.tar.bz2 portage-utils-169ad2331b0a84f8a960402b04077ece57bb35e2.zip |
qpkg: fix Coverity 207883 Error handling issues
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qpkg.c')
-rw-r--r-- | qpkg.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -389,7 +389,8 @@ int qpkg_main(int argc, char **argv) if (fchmod(fd, 0750) < 0) errp("could not chmod(0750) temp bindir '%s'", qpkg_bindir); } - close(fd); + if (fd >= 0) + close(fd); /* we have to change to the root so that we can feed the full paths * to tar when we create the binary package. */ |