Page MenuHomeFreeBSD

D45769.diff
No OneTemporary

D45769.diff

diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -76,7 +76,6 @@
{
struct ifaddrs *ifap, *ifa;
struct ifreq *tif;
- int len = IFNAMSIZ + sizeof(struct sockaddr_storage);
if (getifaddrs(&ifap) != 0)
error("getifaddrs failed");
@@ -119,7 +118,7 @@
LLADDR(foo), foo->sdl_alen);
}
if (!iface->ifp) {
- if ((tif = calloc(1, len)) == NULL)
+ if ((tif = calloc(1, sizeof(struct ifreq))) == NULL)
error("no space to remember ifp");
strlcpy(tif->ifr_name, ifa->ifa_name, IFNAMSIZ);
iface->ifp = tif;

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 13, 3:10 PM (21 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16629190
Default Alt Text
D45769.diff (615 B)

Event Timeline