diff options
author | 2010-01-02 04:21:16 +0000 | |
---|---|---|
committer | 2010-01-02 04:21:16 +0000 | |
commit | d60fc4a49ba5bfd05a3b09e715a328032ca8a26c (patch) | |
tree | 4f19ae42780699a1e61c5605aae297d2b13c6448 /usr.sbin/dhcpd/dhcp.c | |
parent | complete the sync to 1.9.15-pre2: mostly minor fixes (diff) | |
download | wireguard-openbsd-d60fc4a49ba5bfd05a3b09e715a328032ca8a26c.tar.xz wireguard-openbsd-d60fc4a49ba5bfd05a3b09e715a328032ca8a26c.zip |
Eliminate all uses of dmalloc() where the returned pointer
is checked for NULL and a specific error/warning issued. Add
two such manual warning/error checks and kill those dmalloc
calls. And then there were none, so kill dmalloc(). Whew.
Diffstat (limited to 'usr.sbin/dhcpd/dhcp.c')
-rw-r--r-- | usr.sbin/dhcpd/dhcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/dhcp.c b/usr.sbin/dhcpd/dhcp.c index 1bb004e2674..720e8494362 100644 --- a/usr.sbin/dhcpd/dhcp.c +++ b/usr.sbin/dhcpd/dhcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp.c,v 1.29 2010/01/01 20:46:19 krw Exp $ */ +/* $OpenBSD: dhcp.c,v 1.30 2010/01/02 04:21:16 krw Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998, 1999 @@ -951,7 +951,7 @@ ack_lease(struct packet *packet, struct lease *lease, unsigned int offer, /* Save the parameter request list if there is one. */ i = DHO_DHCP_PARAMETER_REQUEST_LIST; if (packet->options[i].data) { - state->prl = dmalloc(packet->options[i].len, "ack_lease: prl"); + state->prl = calloc(1, packet->options[i].len); if (!state->prl) warning("no memory for parameter request list"); else { |