]> git.ipfire.org Git - thirdparty/shadow.git/commit
useradd: free grp to avoid leak 291/head
authorikerexxe <ipedrosa@redhat.com>
Tue, 27 Oct 2020 10:35:53 +0000 (11:35 +0100)
committerikerexxe <ipedrosa@redhat.com>
Tue, 27 Oct 2020 10:42:34 +0000 (11:42 +0100)
commit569bd1d54f4be070d4ac88042586d9334343702d
tree6a58eeef8b387f4248aa2611e140fd5a50302853
parent2df8c0728dcc9a729db96d552d9fe9da64e5648c
useradd: free grp to avoid leak

covscan issue:
Error: RESOURCE_LEAK (CWE-772): [#def39] [important]
src/useradd.c:728: alloc_fn: Storage is returned from allocation function "get_local_group".
src/useradd.c:728: var_assign: Assigning: "grp" = storage returned from "get_local_group(list)".
src/useradd.c:728: overwrite_var: Overwriting "grp" in "grp = get_local_group(list)" leaks the storage that "grp" points to.
726|     * GID values, otherwise the string is looked up as is.
727|     */
728|->  grp = get_local_group (list);
729|
730|    /*
src/useradd.c