diff options
author | Fabian Groffen <grobian@gentoo.org> | 2023-02-07 09:31:42 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2023-02-07 09:31:42 +0100 |
commit | 60b48bf693d25a5a7b09199f9756310b5d7209bf (patch) | |
tree | 53c5a079ee611b53e9a03420558ef8bdc96b2bcf | |
parent | set: try to silence Coverity (diff) | |
download | portage-utils-0.95.tar.gz portage-utils-0.95.tar.bz2 portage-utils-0.95.zip |
main: workaround hypothetical resource leakv0.95
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -584,12 +584,12 @@ read_portage_file(const char *file, enum portage_file_type type, void *data) void *e; snprintf(npath, sizeof(npath), "%s:%zu:%zu-%zu", file, line, cbeg, cend); - p = xstrdup(npath); /* if not necessary, but do it for static code analysers * which take into accound that add_set_value might * allocate a new set when masks would be NULL -- a case * which would never happen */ if (masks != NULL) { + p = xstrdup(npath); add_set_value(buf, p, &e, masks); if (e != NULL) free(p); |