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

@@ -171,7 +171,7 @@ register_hook_internal(struct sudo_hook_list **head,
struct sudo_hook_list *hook;
debug_decl(register_hook_internal, SUDO_DEBUG_HOOKS)
hook = emalloc(sizeof(*hook));
hook = ecalloc(1, sizeof(*hook));
hook->u.generic_fn = hook_fn;
hook->closure = closure;
hook->next = *head;