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

Use ecalloc() when allocating structs.

This commit is contained in:
Todd C. Miller
2012-03-19 11:24:24 -04:00
parent dbbb48c45f
commit 55d1a1a79d
15 changed files with 81 additions and 94 deletions

View File

@@ -116,10 +116,10 @@ alias_add(char *name, int type, struct member *members)
struct alias *a;
debug_decl(alias_add, SUDO_DEBUG_ALIAS)
a = emalloc(sizeof(*a));
a = ecalloc(1, sizeof(*a));
a->name = name;
a->type = type;
a->seqno = 0;
/* a->seqno = 0; */
list2tq(&a->members, members);
if (rbinsert(aliases, a)) {
snprintf(errbuf, sizeof(errbuf), _("Alias `%s' already defined"), name);