2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

Use erealloc3()

This commit is contained in:
Todd C. Miller
2003-03-13 17:03:23 +00:00
parent 006e64f61e
commit 7ce95c61c8
2 changed files with 3 additions and 3 deletions

2
env.c
View File

@@ -242,7 +242,7 @@ insert_env(str, dupcheck)
/* Make sure there is room for the new entry. */
if (env_len + 1 > env_size) {
env_size += 128;
new_environ = erealloc(new_environ, env_size * sizeof(char *));
new_environ = erealloc3(new_environ, env_size, sizeof(char *));
}
if (dupcheck) {

View File

@@ -291,8 +291,8 @@ load_interfaces()
/* If the expected size < real size, realloc the array. */
if (n != num_interfaces) {
if (num_interfaces != 0)
interfaces = (struct interface *) erealloc(interfaces,
sizeof(struct interface) * num_interfaces);
interfaces = (struct interface *) erealloc3(interfaces,
num_interfaces, sizeof(struct interface));
else
free(interfaces);
}