2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Fix use after free in error message when a duplicate alias exists.

This commit is contained in:
Todd C. Miller
2010-04-15 06:14:41 -04:00
parent bc813db528
commit 399aa0d5c7

View File

@@ -121,8 +121,8 @@ alias_add(name, type, members)
a->seqno = 0;
list2tq(&a->members, members);
if (rbinsert(aliases, a)) {
alias_free(a);
snprintf(errbuf, sizeof(errbuf), "Alias `%s' already defined", name);
alias_free(a);
return(errbuf);
}
return(NULL);