Forgot to free two variables upon errors (thanks to cppcheck)

This commit is contained in:
Pierre Pronchery 2009-12-09 21:00:11 +00:00
parent 28bdf37c4e
commit 66fe4e26a3

View File

@ -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