Don't abend if we get ENOMEM from sysctl(3). The data returned
is sufficient MFC after: 2 weeks
This commit is contained in:
parent
3595f21aae
commit
ec95e4c235
@ -884,7 +884,7 @@ SetAliasAddressFromIfName(const char *ifn)
|
||||
err(1, "iflist-sysctl-estimate");
|
||||
if ((buf = malloc(needed)) == NULL)
|
||||
errx(1, "malloc failed");
|
||||
if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1)
|
||||
if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1 && errno != ENOMEM)
|
||||
err(1, "iflist-sysctl-get");
|
||||
lim = buf + needed;
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user