commit: 9fc55602841eb9592b7bbef9cdd2040e1fd07910
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 24 18:56:31 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jan 24 18:56:31 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=9fc55602
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 84fd25d..308aee7 100644
--- a/qmanifest.c
+++ b/qmanifest.c
@@ -434,6 +434,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_files_gz,
strerror(errno));
+ gzclose(mf);
return NULL;
}