mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-25 03:54:17 +01:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179607
@ -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…
Reference in New Issue
Block a user