commit: fafb4fcd0de20133cf61b5c92fdf1649568b3949 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Fri Jan 31 13:06:58 2020 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Fri Jan 31 13:06:58 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=fafb4fcd
qsize: fix Coverity 207953 Resource leak no leak can really be leaked here, because input set is never NULL, but it won't hurt (or cause problems in the future), so let's do it Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> qsize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qsize.c b/qsize.c index 1a1b40e..e54f714 100644 --- a/qsize.c +++ b/qsize.c @@ -145,7 +145,8 @@ qsize_cb(tree_pkg_ctx *pkg_ctx, void *priv) { snprintf(ikey, sizeof(ikey), "%zx%zx", (size_t)st.st_dev, (size_t)st.st_ino); - add_set_unique(ikey, state->uniq_files, &isuniq); + state->uniq_files = + add_set_unique(ikey, state->uniq_files, &isuniq); if (isuniq) num_bytes += state->fs_size ? st.st_blocks * S_BLKSIZE : st.st_size;