mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 20:42:50 +00:00
coverity: #1436916
Resource leak Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
This commit is contained in:
parent
2b65c74cf9
commit
db8b325a3c
@ -101,8 +101,10 @@ static bool lookup_user(const char *optarg, uid_t *uid)
|
||||
|
||||
if (sscanf(optarg, "%u", uid) < 1) {
|
||||
/* not a uid -- perhaps a username */
|
||||
if (sscanf(optarg, "%s", name) < 1)
|
||||
if (sscanf(optarg, "%s", name) < 1) {
|
||||
free(buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = getpwnam_r(name, &pwent, buf, bufsize, &pwentp);
|
||||
if (!pwentp) {
|
||||
|
Loading…
Reference in New Issue
Block a user