diff options
author | 2020-01-24 19:44:36 +0100 | |
---|---|---|
committer | 2020-01-24 19:44:36 +0100 | |
commit | 5c74386bd7c9112df90a7e38fcc14db7ea721e55 (patch) | |
tree | 116718f51b94aea6c4ea4f5697a734d2d588bae3 /qpkg.c | |
parent | qmanifest: fix Coverity 206540 Resource leak (diff) | |
download | portage-utils-5c74386bd7c9112df90a7e38fcc14db7ea721e55.tar.gz portage-utils-5c74386bd7c9112df90a7e38fcc14db7ea721e55.tar.bz2 portage-utils-5c74386bd7c9112df90a7e38fcc14db7ea721e55.zip |
qpkg: fix Coverity 125896 Unchecked return value
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qpkg.c')
-rw-r--r-- | qpkg.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -308,7 +308,12 @@ qpkg_make(depend_atom *atom) rmdir(tmpdir); - stat(buf, &st); + if (stat(buf, &st) == -1) { + warnp("could not stat '%s': %s", buf strerror(errno)); + free(buf); + return 1; + } + printf("%s%s%s KiB\n", RED, make_human_readable_str(st.st_size, 1, KILOBYTE), NORM); |