summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcpd/alloc.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2010-01-01 20:30:24 +0000
committerkrw <krw@openbsd.org>2010-01-01 20:30:24 +0000
commit04b89754fa7bfb47963cc00764981d546152aafa (patch)
tree2630fdebccb4997efc1536faec0583cac240481a /usr.sbin/dhcpd/alloc.c
parentMap the device registers before using them. We were lucky that some other (diff)
downloadwireguard-openbsd-04b89754fa7bfb47963cc00764981d546152aafa.tar.xz
wireguard-openbsd-04b89754fa7bfb47963cc00764981d546152aafa.zip
Wrappers around a wrapper around free() are of no more use than
wrappers around wrappers around calloc(). The purpose of the free() wrapper is to generate an error message when free'ing NULL. But free_hash_bucket(), free_lease(), and free_tree() are all called immediately after dereferencing the pointer to be freed. Thus the error message will never be issued.
Diffstat (limited to 'usr.sbin/dhcpd/alloc.c')
-rw-r--r--usr.sbin/dhcpd/alloc.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/usr.sbin/dhcpd/alloc.c b/usr.sbin/dhcpd/alloc.c
index 01db3635eb0..d658d0c43b5 100644
--- a/usr.sbin/dhcpd/alloc.c
+++ b/usr.sbin/dhcpd/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.9 2010/01/01 19:10:24 krw Exp $ */
+/* $OpenBSD: alloc.c,v 1.10 2010/01/01 20:30:24 krw Exp $ */
/* Memory allocation... */
@@ -83,24 +83,12 @@ new_tree_cache(char *name)
}
void
-free_hash_bucket(struct hash_bucket *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
-void
free_tree_cache(struct tree_cache *ptr)
{
ptr->value = (unsigned char *)free_tree_caches;
free_tree_caches = ptr;
}
-void
-free_tree(struct tree *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
struct lease_state *
new_lease_state(char *name)
{
@@ -123,9 +111,3 @@ free_lease_state(struct lease_state *ptr, char *name)
ptr->next = free_lease_states;
free_lease_states = ptr;
}
-
-void
-free_lease(struct lease *ptr, char *name)
-{
- dfree(ptr, name);
-}