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

@@ -134,9 +134,9 @@ sudo_load_plugins(struct plugin_container *policy_plugin,
policy_plugin->options = info->options;
policy_plugin->u.generic = plugin;
} else if (plugin->type == SUDO_IO_PLUGIN) {
container = emalloc(sizeof(*container));
container = ecalloc(1, sizeof(*container));
container->prev = container;
container->next = NULL;
/* container->next = NULL; */
container->handle = handle;
container->name = info->symbol_name;
container->options = info->options;