commit:     d16c14190cac7e757f87402a95f2d4a1c12281e1
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 18:25:09 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 18:25:09 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d16c1419

qmanifest: fix Coverity 206540 Resource leak

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 qmanifest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qmanifest.c b/qmanifest.c
index cc4e380..a00dbd2 100644
--- a/qmanifest.c
+++ b/qmanifest.c
@@ -542,6 +542,7 @@ generate_dir(const char *dir, enum type_manifest mtype)
                        if (gzwrite(mf, path, len) == 0) {
                                fprintf(stderr, "failed to write to file 
'%s/%s': %s\n",
                                                dir, str_manifest_gz, 
strerror(errno));
+                               gzclose(mf);
                                return NULL;
                        }
                }

Reply via email to