Forgot to free two variables upon errors (thanks to cppcheck)
This commit is contained in:
parent
28bdf37c4e
commit
66fe4e26a3
4
src/id.c
4
src/id.c
|
@ -199,12 +199,16 @@ static int _id_all(char const * user)
|
|||
if((pw = getpwuid(geteuid())) == NULL)
|
||||
{
|
||||
putchar('\n');
|
||||
free(u);
|
||||
return _id_error("getpwuid", 1);
|
||||
}
|
||||
printf(" euid=%u(%s) e", (unsigned)pw->pw_uid,
|
||||
pw->pw_name);
|
||||
if(_print_gid(pw->pw_gid) == NULL)
|
||||
{
|
||||
free(u);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user