mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Refactor freeing of a member_list into free_members().
This commit is contained in:
@@ -170,21 +170,10 @@ void
|
||||
alias_free(void *v)
|
||||
{
|
||||
struct alias *a = (struct alias *)v;
|
||||
struct member *m;
|
||||
struct sudo_command *c;
|
||||
void *next;
|
||||
debug_decl(alias_free, SUDOERS_DEBUG_ALIAS)
|
||||
|
||||
free(a->name);
|
||||
TAILQ_FOREACH_SAFE(m, &a->members, entries, next) {
|
||||
if (m->type == COMMAND) {
|
||||
c = (struct sudo_command *) m->name;
|
||||
free(c->cmnd);
|
||||
free(c->args);
|
||||
}
|
||||
free(m->name);
|
||||
free(m);
|
||||
}
|
||||
free_members(&a->members);
|
||||
free(a);
|
||||
|
||||
debug_return;
|
||||
|
Reference in New Issue
Block a user