mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 13:58:05 +00:00
now sets removes # bogus interfaces from num_interfaces
This commit is contained in:
parent
166d2b78ba
commit
050ca432ac
3
sudo.c
3
sudo.c
@ -683,8 +683,9 @@ static void load_interfaces()
|
||||
|
||||
/* if there were bogus entries, realloc the array */
|
||||
if (i != j) {
|
||||
num_interfaces = j;
|
||||
interfaces = (struct interface *) realloc(interfaces,
|
||||
sizeof(struct interface) * j);
|
||||
sizeof(struct interface) * num_interfaces);
|
||||
if (interfaces == NULL) {
|
||||
perror("realloc");
|
||||
(void) fprintf(stderr, "%s: cannot allocate memory!\n", Argv[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user